When you use GROUP_BY, you can only select aggregates or columsn in the GROUP_BY
COUNT(*) /COUNT(1)counts all rows
COUNT(*)
COUNT(1)
COUNT(column) counts non-NULLs only
COUNT(column)
SELECT COUNT(*) FROM orders GROUP BY ds;
Even works for strings where later in the alphabet is more
Last updated 5 years ago