0% found this document useful (0 votes)
43 views1 page

SQL V2 Light

The document provides a concise SQL cheatsheet covering commands, clauses, and joins. It includes examples for selecting columns, applying filters, and performing aggregate functions. Additionally, it outlines the order of execution for SQL statements and differentiates between data definition and manipulation languages.

Uploaded by

1uis Fe11ipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views1 page

SQL V2 Light

The document provides a concise SQL cheatsheet covering commands, clauses, and joins. It includes examples for selecting columns, applying filters, and performing aggregate functions. Additionally, it outlines the order of execution for SQL statements and differentiates between data definition and manipulation languages.

Uploaded by

1uis Fe11ipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL

CONSIDER

Sources SUPPORTING ME

[Link]
[Link]
CHEATSHEET @AbzAaron

Commands / Clauses Joins Examples

Select all columns with filter applied

a b

Select first 10 rows for two columns


a INNER JOIN b

Select all columns with multiple filters


a b

a LEFT JOIN b
Select all rows from col1 & col2 ordering by col1

a b
Return count of rows in table

a RIGHT JOIN b

Return sum of col1

a b

Return max value for col1


a FULL OUTER JOIN b

Compute summary stats by grouping col2

Data Definition Language Order Of


Execution
CREATE ALTER
Combine data from 2 tables using left join

FROM

DROP WHERE Aggregate and filter result

GROUP BY

HAVING
Data Manipulation Language
UPDATE INSERT
SELECT Implementation of CASE statement

ORDER BY

DELETE SELECT LIMIT

You might also like