3.12 SQL: Components of a query
SELECT
columnsFROM
a table in a databaseWHERE
rows meet a conditionGROUP BY
values of a columnORDER BY
values of a column when displaying resultsLIMIT
to only X number of rows in resulting table- Always required:
SELECT
andFROM
. Rest are optional. SELECT
can be combined with operators such asSUM
,COUNT
,AVG
…- To merge multiple tables, you can use
JOIN