The required commands for a SQL query
What are SELECT & FROM?
This keyword retains any duplicate rows that are produced by UNION
What is a ALL? (UNION ALL)
Click the 'EXECUTE' command on the toolbar
OR
Ctrl + Enter
How do you run a SQL query?
Determines which rows are selected from the tables; works as a filter
What is the WHERE command?
Stacks tables onto each other, lining up common fields, and adding rows
What is a UNION?
Eliminates duplicates from a SQL query
What is DISTINCT?
Non-aggregated fields/columns that appear in the SELECT statement with fields/columns that are aggregated must appear here.
What is the GROUP BY command?
This character allows you to SELECT all records from a table, without having to list each column out.
What is an asterisk?
Combines columns from separate tables using unique identifiers, similar to VLOOKUP's in Excel
What is a JOIN?
Stored queries that create a "table" that you can then further query off of.
What is a view?
This SQL Command filters only on aggregated values
What is HAVING?
This character indicates the end of a SQL query
What is a semicolon
Only returns rows where there is a match in both tables on the join key, default JOIN type
What is an INNER JOIN?
Use the syntax /* */ or --
How do you add comments to SQL?
A free multi-platform database tool for developers, database administrators, analysts and all people who need to work with databases.
What is DBeaver?
Used to group data into categories/classifications, and/or map labels to certain data values/conditions
What are CASE statements?
WHERE Weight is between 2000 and 3000
OR Where Weight is > 1999 and < 3001
OR WHERE Weight is >= to 2000 and <=3000
What WHERE clause will select weight values between 2000 and 3000?
When tables in a union don't match, the union produces extra fields. The extra fields are valid data being excluded from their appropriate context.