Please guys help me out with these queries?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • enonem12
    New Member
    • Mar 2008
    • 2

    Please guys help me out with these queries?

    Here is the info:Query 2: Show all orders from London. Display supplier number, part number and quantity.

    Query 3: Show the total number of units ordered from each supplier. Display supplier number and total number of units.

    Query 4: Show the total weight of parts ordered from each supplier. Display supplier number and total weight.

    Query 5: Who supplies the part named “Cam”? Display supplier number and part name.

    The necesarry tables:
    Table: SUPPLIERS
    Suppliers
    S_NO SNAME STATUS CITY
    S1 Smith 20 London
    S2 Jones 10 Paris
    S3 Mayrand 30 Paris
    S4 Adams 20 London
    S5 Stavrulaki 30 Athens
    S6 Yuma 20 New York
    S7 Singh 10 Bombay

    Table: PARTS
    Parts
    P_NO PNAME Color Unit Price Weight
    P1 Nut Red 12 3
    P2 Bolt Green 17 9
    P3 Screw Blue 17 2
    P4 Screw Red 14 2
    P5 Cam Blue 12 12
    P6 Cog Red 19 10
    P7 Plug Black 23 5
    P8 Wire Grey 14 2
    P9 Washer Black 3 1

    Table: ORDERS
    Orders
    S_NO P_NO Quantity
    S1 P2 200
    S1 P3 400
    S1 P4 200
    S1 P5 100
    S1 P6 100
    S1 P1 300
    S2 P1 300
    S2 P2 400
    S3 P2 200
    S3 P9 1200
    S4 P4 300
    S4 P5 400
    S4 P2 200
    S5 P9 1000
    S5 P4 300
    S5 P8 200
    S6 P8 800
    S6 P1 200
    S7 P3 400
    S7 P7 600


    I've been trying to figure out these esp. the 3 and 4? help.
  • enonem12
    New Member
    • Mar 2008
    • 2

    #2
    for the tables, s_no is supplier number
    p_no is part number

    Comment

    Working...