
(a) SELECT keeper_name FROM keeper
(b) SELECT DISTINCT food FROM eats
(c) SELECT animal_name FROM eats WHERE food = 'hay' OR food = 'people'
(d) SELECT animal_name, keeper_no FROM supervision WHERE keeper_no
> '100' (4 min)
4. Write SQL statements to derive the answers to the following queries. Each result
table should not contain any superfluous data.
(a) What does a camel eat?
(b) What are the keeper_no(s) of the keepers called Morris? (1 min)
5. Write down the table occurrences generated by each of the following queries.
(a) SELECT * FROM eats JOIN supervision USING (animal_name)
(b) SELECT food FROM eats, supervision
WHERE eats.animal_name = supervision.animal_name ...