Home » Developer & Programmer » Forms » Sql Query
Sql Query [message #85377] Sun, 20 June 2004 20:45 Go to next message
amit goel
Messages: 20
Registered: March 2004
Junior Member
Suppose table: Sales having values

Sid Product
1 A
1 B
1 C
2 A
2 B
3 A
3 B
3 C
4 B

Please help me to write a SQL statement to find out those SID who has all the products and the SID and Product list grows dynamically.
Re: Sql Query [message #85379 is a reply to message #85377] Mon, 21 June 2004 00:31 Go to previous message
nsk
Messages: 16
Registered: June 2004
Junior Member
u can try with this query

select sid,count(*) as a from ssales group by sid
having count(*) = (select max(count(*)) from ssales group by sid)
Previous Topic: features in oracle report printer files
Next Topic: uploading mdb access file into oracle database with the help of forms
Goto Forum:
  


Current Time: Tue May 07 00:45:58 CDT 2024