SQL Cheat Sheet

This is a handy cheat sheet for simple SQL reporting. Ordering Columns Ordering by a single column criteria: SELECT * FROM <table name> ORDER BY <column> [ASC|DESC]; ASC is used to order results in ascending order. DESC is used to order results in descending order. Examples: SELECT * FROM books ORDER BY title ASC;SELECT * … Read more