SQL: The Query Language

10/13/99


Click here to start


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)

Email: vandenbe@cs.washington.edu

Home Page: http://www.cs.washington.edu/education/courses/594/99au/

Download presentation source