Home » RDBMS Server » Server Administration » query
query [message #372095] Wed, 10 January 2001 01:55 Go to next message
debasish
Messages: 14
Registered: January 2001
Junior Member
Sir,
I hv a table of orders below:
ORDER_NO SCode PCode QTY_SUPPLIED ORDER_DATe SUPPLY_DA
-------- -- -- ------------ --------- ---------
1 S1 P1 300 12-JAN-97
2 S1 P2 200 12-JAN-97
3 S1 P3 400 15-JAN-97
4 S1 P4 200 18-FEB-97
5 S1 P5 100 22-MAR-97
6 S1 P6 100 25-MAR-97
7 S2 P1 300 28-MAY-97
8 S2 P2 400 23-JUN-97
9 S3 P2 200 23-OCT-97
10 S4 P2 200 14-NOV-97
11 S4 P4 300 18-DEC-97
12 S4 P5 400 18-JAN-97
i want to know the details of suppliers who supplies each & every part in the order table.
ans for query 2->here [message #372143 is a reply to message #372095] Mon, 15 January 2001 06:01 Go to previous messageGo to next message
.::GK::.
Messages: 1
Registered: January 2001
Junior Member
select sc from orders group by sc having count(distinct(pc))=6

.::GK::.
Re: ans for query 2->here [message #372216 is a reply to message #372095] Fri, 19 January 2001 01:42 Go to previous message
debasish
Messages: 14
Registered: January 2001
Junior Member
Q. Get all the supplier details who supplies all the parts supplied by supplier S2.

TABLE IS OF ORDERS
ORDER_NO SC PC QTY_SUPPLIED ORDER_DAT SUPPLY_DA
--------- -- -- ------------ --------- ---------
1 S1 P1 300 12-JAN-97
2 S1 P2 200 12-JAN-97
3 S1 P3 400 15-JAN-97
4 S1 P4 200 18-FEB-97
5 S1 P5 100 22-MAR-97
6 S1 P6 100 25-MAR-97
7 S2 P1 300 28-MAY-97
8 S2 P2 400 23-JUN-97
9 S3 P2 200 23-OCT-97
10 S4 P2 200 14-NOV-97
11 S4 P4 300 18-DEC-97
12 S4 P5 400 18-JAN-97
Previous Topic: Parameter Question
Next Topic: Complex hierarchical query - how to?
Goto Forum:
  


Current Time: Sat May 18 00:00:49 CDT 2024