Need help with a college SQL exam question... - Mailing list pgsql-sql

From dejauser2001@yahoo.co.uk (dejauser2001@yahoo.co.uk)
Subject Need help with a college SQL exam question...
Date
Msg-id 383ef96c.0111290754.4ab26b07@posting.google.com
Whole thread Raw
Responses Re: Need help with a college SQL exam question...
List pgsql-sql
Hi everyone,

Its coming close to my January examinations, and
while revising I got stuck in the follwing question.
I literally spent hours trying to solve it but I
just can't :(

Consider the folowing relations; (where the * means
primary key)

The "Car Rental" database
-------------------------

customer(*cust_num*,cust_name)
hire(*car_reg*,*cust_num*,*hire_date*)
shop(*outlet_code*,address)
car_model(*model*,make,num_seats,max_speed)
car(*car reg*,model,year, outlet_code)

And the question is;
Using SQL (using SELECT, FROM, WHERE, GROUP BY, COUNT(*), etc..) write a query
to list the names of customers who have borrowed cars made by every maker.

Thats it! Hard or what?

Any help greatly apreciated


pgsql-sql by date:

Previous
From: "Aasmund Midttun Godal"
Date:
Subject: Re: PL/pgSQL examples NOT involving functions
Next
From: ananthreddy@yahoo.com (ananth)
Date:
Subject: Error in executing plpgsql function