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 -> SQL : How to formulate the query

SQL : How to formulate the query

From: Chua Boon Yiang <chuaby_at_hotmail.com>
Date: Thu, 2 Dec 1999 09:19:25 +0800
Message-ID: <824he2$rkg$1@newton3.pacific.net.sg>


Hi
presume i have these 2 fields in a table :

F1 F2
=== ===

1         a
1         c
2         a
2         b
3         b
3         c
4         c
4         a

I would like to get a stat of "how many with 'a' have 'b' or 'c' "

eg

a with            b with
    b    = 1          c    =    1

    c = 2

May i know how should i roughly come out with the SQL ?

Thanks
Boon Yiang Received on Wed Dec 01 1999 - 19:19:25 CST

Original text of this message

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