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

SQL Exercises 8: Instruction

The document provides instructions for 7 SQL exercises involving the use of EXCEPT, INTERSECT, or UNION to query and combine data from tables on teachers, students, cities, and years of birth. The exercises include listing teachers' and students' surnames together, cities with campuses that do or do not have students living there, and years when teachers and/or students were born either together or separately.

Uploaded by

Trance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

SQL Exercises 8: Instruction

The document provides instructions for 7 SQL exercises involving the use of EXCEPT, INTERSECT, or UNION to query and combine data from tables on teachers, students, cities, and years of birth. The exercises include listing teachers' and students' surnames together, cities with campuses that do or do not have students living there, and years when teachers and/or students were born either together or separately.

Uploaded by

Trance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Kari Silpiö TAKKULA 2.

0 / SQL Exercises 8 1(1)


11.2.2016 Version 1.0

SQL EXERCISES 8

INSTRUCTION

Use one of the following in each task below: EXCEPT, INTERSECT, or UNION.

1. List teachers' and students' surnames. Show the result as a single list.

2. List such cities where there is a campus and at least one student is living in the city.

3. List such cities where there is a campus and no student is living in the city.

4. List such years when at least one teacher was born OR at least one student was born. Display the
result in descending order.

5. List such years when at least one teacher was born AND at least one student was born

6. List such years when at least one teacher was born AND no student was born.

7. List such years when at least one student was born AND no teacher was born. Display the result in
descending order.

You might also like