Re: how to make this query? Please help me

From: <pberetta_at_my-deja.com>
Date: Fri, 26 Nov 1999 14:48:26 GMT
Message-ID: <81m6jq$e0s$1_at_nnrp1.deja.com>


We'll get this right yet. This is a correction of my first reply (the WHERE clause was wrong).

BREAK ON name
SELECT name, date
FROM shows, dates
WHERE dates.showid = shows.id
ORDER BY name desc, date;

Hope this helps.
Paul

In article <383d8d55.802997_at_news2.cistron.nl>,   maikoo_at_cistron.nl (Maiko) wrote:
> I've 2 tables:
>
> shows and dates with the following contents:
>
> SHOWS:
>
> id name
> 1 showa
> 2 showb
> 3 showc
>
> DATES:
>
> id showid date
> 1 1 25-11-1999
> 2 1 30-11-1999
> 3 2 24-11-1999
> 4 2 27-11-1999
>
> We want the output of a query ordered by date and grouped by showname,
> ie
>
> showb 24-11-1999
> 27-11-1999
> showa 25-11-1999
> 30-11-1999
>
> Please help me out, and tell me how to do this in SQL. It's very
> urgent for me so any help will be very appreciated.
>
> Thanx in advance,
>
> Maiko (maikoo_at_cistron.nl)
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Nov 26 1999 - 15:48:26 CET

Original text of this message