0% found this document useful (0 votes)
38 views

SQL V2 Dark

This document provides a cheat sheet overview of SQL commands and clauses including data definition language commands like CREATE and ALTER, data manipulation language commands like UPDATE and DELETE, joins like INNER JOIN and LEFT JOIN, aggregation examples like COUNT and SUM, and ordering/filtering examples like ORDER BY, LIMIT, and HAVING clauses.

Uploaded by

rafael reginaldo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

SQL V2 Dark

This document provides a cheat sheet overview of SQL commands and clauses including data definition language commands like CREATE and ALTER, data manipulation language commands like UPDATE and DELETE, joins like INNER JOIN and LEFT JOIN, aggregation examples like COUNT and SUM, and ordering/filtering examples like ORDER BY, LIMIT, and HAVING clauses.

Uploaded by

rafael reginaldo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL

Sources CONSIDER
SUPPORTING ME

W3Schools.com
DataQuest.io @AbzAaron

CHEATSHEET

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

Data Manipulation Language HAVING

UPDATE INSERT
SELECT Implementation of CASE statement

ORDER BY

DELETE SELECT LIMIT

You might also like