Article View: bit.listserv.sqlinfo
Article #330SQL Problem
From: Mark & Lee
Date: Thu, 26 Aug 1999 00:00
Date: Thu, 26 Aug 1999 00:00
30 lines
1660 bytes
1660 bytes
Can someone please help me as I am new to SQL and having a bit of trouble
with an assignment. Problem is:
I need to create a single textfile with a statement that addresses the
following:
This query is about tracks that have the same length on the same album. For
each pair of such tracks, display one row showing the length, the album
code, and the title of each matching track,
e.g. 191 7599-27313-2 Dont Stop I dont want to know
cannot show the same pair of tracks more than once, i.e with the track
titles swapped around.
191 7599-27313-2 Dont Stop I dont want to know
191 7599-27313-2 I dont want to know Dont Stop.
What I have done so far is,
Select Length,AlbumCode,TrackTitle from Tracks
Group by Length,AlbumCode,Tracktitle
having count (Length) >1;
but of course query is looking for Length,AlbumCode and Tracktitle which has
a count greater than 1...Result NIL
How can I get around this?????
Mark
Technical Details
Message-ID:
<BB1x3.3180$hf4.41942@nsw.nnrp.telstra.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11355a,9aa628f52dd40962,start X-Google-Attributes: gid11355a,public From: "Mark & Lee" <eureka@spiderweb.com.au> Subject: SQL Problem Date: 1999/08/26 Message-ID: <BB1x3.3180$hf4.41942@nsw.nnrp.telstra.net> X-Deja-AN: 517277327 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 X-Complaints-To: abuse@telstra.net X-Trace: nsw.nnrp.telstra.net 935634401 203.46.13.23 (Thu, 26 Aug 1999 12:26:41 EST) Organization: Customer of Telstra Big Pond Direct X-MSMail-Priority: Normal NNTP-Posting-Date: Thu, 26 Aug 1999 12:26:41 EST Newsgroups: bit.listserv.sqlinfo