pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dejauser2001@yahoo.co.uk
To: pgsql-sql@postgresql.org
Subject: Need help with a college SQL exam question...
Date: 29 Nov 2001 07:54:52 -0800
Message-ID: <383ef96c.0111290754.4ab26b07@posting.google.com> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <383ef96c.0111290754.4ab26b07@posting.google.com>
Permalink:  ../383ef96c.0111290754.4ab26b07@posting.google.com/
Also on:    postgresql.org/message-id/383ef96c.0111290754.4ab26b07@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dejauser2001@yahoo.co.uk
  Subject: Re: Need help with a college SQL exam question...
  In-Reply-To: <383ef96c.0111290754.4ab26b07@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox