英文:
Count and Where
问题
SELECT invoiceid, customerid, billingcity
FROM invoices
WHERE billingcity IN ('Brasilia', 'Edmonton', 'Vancouver')
ORDER BY invoiceid DESC
尝试使用逗号或AND在城市之间时一直出错。
英文:
Finding all the invoices from the billing city Brasilia, Edmonton, and Vancouver in descending order by invoice. Do I need the GROUP BY clause? I the WHERE function do I use AND between the cities or commas?
SELECT invoiceid,
customerid,
billingcity,
FROM invoices
WHERE billingcity
ORDER BY invoiceid
Tried the AND and comma between cities keep getting error.
答案1
得分: 1
SELECT invoiceid, customerid, billingcity
FROM invoices
WHERE billingcity IN ('Brasilia', 'Edmonton', 'Vancouver')
ORDER BY invoiceid DESC
英文:
SELECT invoiceid, customerid, billingcity
FROM invoices
WHERE billingcity IN ('Brasilia', 'Edmonton', 'Vancouver')
ORDER BY invoiceid DESC
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论