Table of Contents
SQL: The Query Language
Example Instances
Basic SQL Query
Conceptual Evaluation Strategy
Example of Conceptual Evaluation
A Note on Range Variables
Find sailors who’ve reserved at least one boat
Expressions and Strings
Find sid’s of sailors who’ve reserved a red or a green boat
Find sid’s of sailors who’ve reserved a red and a green boat
Nested Queries
Nested Queries with Correlation
More on Set-Comparison Operators
Aggregate Operators
Find name and age of the oldest sailor(s)
GROUP BY and HAVING
Queries With GROUP BY and HAVING
Conceptual Evaluation
Find the age of the youngest sailor with age 18, for each rating with at least 2 such sailors
For each red boat, find the number of reservations for this boat
Sorting a Result
Null Values
Summary
Summary (cont’d)
|