teaching.rouxl.es
records
table), we can grab values from that table using a FROM
clause*
will select all columns from a tableSELECT [columns] FROM [tables] WHERE [condition] ORDER BY [criteria] LIMIT [number];
Demo:
SELECT * FROM records WHERE title = "Programmer";
SELECT name, salary FROM records WHERE division = "Accounting"
ORDER BY salary DESC LIMIT 5;
SELECT * FROM records, meetings; -- can select multiple tables
as
keywordSELECT a.name, a.title FROM records AS a, records AS b
WHERE a.name = "Louis Reasoner" AND a.supervisor = b.name;
SELECT COUNT(*) FROM RECORDS;
SELECT name, MAX(salary) FROM RECORDS;
GROUP BY
will allow you to perform these aggregation functions on specific groups
SELECT division, MIN(salary) FROM records GROUP BY division;
WHERE
statements for GROUP BY
s uses the HAVING
clause
HAVING
filters out entire groupsWHERE
and HAVING
in the same statementlinks.rouxl.es/disc
)links.rouxl.es/feedback
Thanks for coming!
Please give me feedback on what to improve!