bpyeo
asked on
Counting the product delivery
Hi, I have two tables namely tblProduct and tblDelivery with the following definition:
tblProduct - pid,pdesc
tblDelivery - pid,date,time,location
where the keys are bold.
Now I want to construct a sql statement to display pid,pdesc,totalNumberOfDel iveryBased OnDate sorted by pid, date
Please advice me on how to construct this sql statement.
tblProduct - pid,pdesc
tblDelivery - pid,date,time,location
where the keys are bold.
Now I want to construct a sql statement to display pid,pdesc,totalNumberOfDel
Please advice me on how to construct this sql statement.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select a.pid, a.desc, count(b.pid), b.date from tblProduct a, tblDelivery b where a.pid = b.pid group by b.date