计数和位置

huangapple go评论64阅读模式
英文:

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

huangapple
  • 本文由 发表于 2023年6月19日 13:38:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76503860.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定