May 2020
Beginner
564 pages
14h 9m
English
To group data using GROUP BY, you can use the following sample syntax. WHERE and ORDER BY are optional:
SELECT column(s) FROM tableWHERE condition(s)GROUP BY columns(s)ORDER BY column(s);
To get subtotals and totals with GROUP BY and ROLLUP, you can use the following sample syntax:
SELECT col1, col2, col3 FROM tableGROUP BY col2, col1, WITH ROLLUP;
Read now
Unlock full access