count variants
count(*) counts rows. count(col) counts rows where col is not NULL. count(DISTINCT col) counts the different non-NULL values.
task
For orders: count(*), count(coupon), count(DISTINCT coupon) in one row.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
count(*) counts rows. count(col) counts rows where col is not NULL. count(DISTINCT col) counts the different non-NULL values.
For orders: count(*), count(coupon), count(DISTINCT coupon) in one row.