« speakers last thursday! | Main | oracle question »

Comments

khalid

sql question

samson

Pls let me know the answer

Table : Salsman

salman_id salsman_name
id001 samson
id002 christy
id003 francis

Table : Product

P_id p_name

P001 pencil
P002 pen
P003 note book

Table : Sales

Salsman_ID product_id Quanty

id001 p001 100
id002 p002 50
id001 p001 90
id001 p001 50
id003 p002 100
id001 p002 50
id002 p002 50

what is the query to retrive the following resultset

salsman_id P001 p002 p003 ....
id001 240 50 0
id002 0 100 0
id003 0 100 0


Pls mail me the query immediately

The comments to this entry are closed.