SQL Worksheets tagged DSA

Index

Worksheets

1. Introduction to the Emp-dept case study View
2. Some simple SQL Select statements View
3. Using Functions View
4. Selecting ROWS to display View
5. Multiple tables View
6. Summarising and Grouping View
7. Handling Dates View
8. Inner and Outer Joins View

Subject Index

Arithmetic Expressions
Column Alias
DESCRIBE TABLE
Date Comparison
Function AVG()
Function COUNT()
Function CURRENT-DATE()
Function CURRENT-TIME()
Function DATE_ADD()
Function DAYOFMONTH()
Function IFNULL()
Function MAX()
Function MIN()
Function MONTH()
Function NOT()
Function ROUND()
Function TO_DAYS()
Function YEAR()
JOIN
Multi-table Join
Operator =
Operator >
Operator AND
Operator BETWEEN
Operator IN
Operator INTERVAL
Operator IS NULL
Operator LIKE
Operator OR
Relation PRODUCT
SELECT .. FROM
SELECT .. FROM .. ORDER BY
SELECT .. FROM .. ORDER BY .. DESC
SELECT .. FROM .. WHERE
SELECT .. INNER JOIN.. ON
SELECT .. NATURAL JOIN
SELECT .. OUTER LEFT JOIN.. ON
SELECT ... GROUP BY..
SELECT ... GROUP BY.. HAVING ..
SELECT ... LIMIT n.
SELECT DISTINCT .. FROM ..
SHOW TABLES
Self Join
Table Alias
Theta Join