GROUP BY

From rbachwiki
Revision as of 00:07, 1 November 2017 by Bacchas (talk | contribs) (Created page with "== Returns queries in groups == SELECT SALES_DATE, SUM(TOTAL_AMOUNT) FROM SALES GROUP BY SALES_DATE; ''' This will take the sales made on the dates add them and return a c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns queries in groups

SELECT SALES_DATE, SUM(TOTAL_AMOUNT)
FROM SALES
GROUP BY SALES_DATE;

This will take the sales made on the dates add them and return a column with the date -> total amount