/* Are there any big dogs? */ SELECT * FROM dog WHERE size = 'big'; /* What dogs are with people wearing caps? */ SELECT dog.size, dog.colour FROM dog, onLead, person WHERE dog.dogId = onLead.dog AND onLead.person = person.personID AND person.hat = 'cap'; /* Does anyone have more than one dog? */ SELECT personID FROM person WHERE (SELECT COUNT(*) FROM onLead,dog WHERE onLead.person = person.personID AND onLead.dog = dog.dogID) > 1; /* Is anybody wearing an item of clothing the same colour as (one of) their dog(s)? */ /* EXERCISE ! */