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

From Josh Berkus
Subject Re: Need help with a college SQL exam question...
Date
Msg-id web-519065@davinci.ethosmedia.com
Whole thread Raw
In response to Need help with a college SQL exam question...  (dejauser2001@yahoo.co.uk (dejauser2001@yahoo.co.uk))
Responses Re: Need help with a college SQL exam question...
List pgsql-sql
"dejauser":

> 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 :(

hmmm ... I don't think it's according to the honor code to ask us to
help with your exams.  ;-)

> 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.

It's doable.  Just think "nested subselects" and heavy use of the HAVING
clause.  They're also screwing with you by providing an irrelevant table
(shop) and not providing a relevant table (makers).  If I was the
professor, I'd give the question writer a D+ for database design ...

-Josh

______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: persistent connections, AOLserver (Was: maybe Offtopic :
Next
From: "Josh Berkus"
Date:
Subject: Re: An easy question about creating a primary key