Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Need help on Oracle SQL query

Re: Need help on Oracle SQL query

From: Colin Sutherland <c.sutherland_at_easynet.com>
Date: Sat, 2 May 1998 12:31:12 +0100
Message-ID: <6if06m$t0d$1@apple.news.easynet.net>


If I understand correctly this should do the trick

SELECT location, COUNT(location)
FROM ticket_table
WHERE row_num < 10
GROUP BY location

HTH Colin.
BK wrote in message <354A55A7.331DAA1_at_watchmark.com>...
>Hi,
>
>I got a trouble ticket table with the following columns:
> Ticket_Id,
> Location,
> and some ticket info columns.
>
>I need to do a query that give me top ten locations with the most
>trouble ticket counts.
>
>I try this query
> select * from trouble_ticket where location =
> ( select location from trouble_ticket group by location having
>count(*) > 1);
>
>but this only provide me with locations that exceeded the threshold
>value for trouble count.
>
>Any idea?
>
>
>BK
>
Received on Sat May 02 1998 - 06:31:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US