Re: how to make this query? Please help me

From: <pberetta_at_my-deja.com>
Date: Fri, 26 Nov 1999 12:11:52 GMT
Message-ID: <81lte7$7rq$1_at_nnrp1.deja.com>


Maiko,
This should work:

BREAK ON name
SELECT name, date

FROM      shows, dates
WHERE     dates.id = shows.id

ORDER BY name desc, date;

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 - 13:11:52 CET

Original text of this message