SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING
SELECT, FROM, WHERE, HAVING, ORDER BY, GROUP BY
SELECT, FROM, WHERE, HAVING, GROUP BY, ORDER BY
SELECT, FROM, GROUP BY, HAVING, ORDER BY, WHERE
SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
SELECT fields
FROM tables
WHERE conditions
GROUP BY fields
HAVING conditions on aggregate fields
OREDR BY fields
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name
HAVING aggregate_function(column_name) operator value;
SELECT column-list
FROM table_name
[WHERE condition]
[ORDER BY column1, column2, .. columnN] [ASC | DESC];
You can use more than one column in the ORDER BY clause. Make sure whatever column you are using to sort, that column should be in column-list.
Login in to like
Login in to comment