Unit 3, lesson 4 · ||
Gluing text together with ||
Name and city on one line
Two vertical bars join text end to end: 'Desk' || ' ' || 'mat' gives 'Desk mat'. Every space, comma or bracket you want in the result has to be added as its own piece of text in single quotes. Numbers join too; they are turned into text first.
SELECT name || ', ' || category AS listing
FROM products;Your task
The welcome email shows each customer as one line, like 'Ava Patel (Denver)'. List every customer's id and that line, as label.
Tables you will use: customers
Try it in your browserFree, no sign-up. Your query is checked as you go.