Sql Queries For Mere Mortals -

Relational databases don't think in rows; they think in . Every query you write is essentially asking the database to find a specific group of data and "set" it aside for you.

Use these to total up sales or count your users. SQL Queries for Mere Mortals

Use the DISTINCT keyword right after SELECT to clean up redundant rows in your results. Relational databases don't think in rows; they think in

Sometimes you don't need raw data; you need the "big picture." Use to crunch numbers: Use the DISTINCT keyword right after SELECT to

Combining two groups together (e.g., a list of all customers and all vendors).

Includes all records from one table, even if there is no match in the other (useful for finding "missing" data, like products that haven't sold). 4. Summarizing and Grouping

The standard. It only shows rows where there is a match in both tables (e.g., Orders that have a valid Customer).