Link to home
Start Free TrialLog in
Avatar of bpyeo
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,totalNumberOfDeliveryBasedOnDate sorted by pid, date

Please advice me on how to construct this sql statement.
ASKER CERTIFIED SOLUTION
Avatar of tigin44
tigin44
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
select a.pid, a.desc, count(b.pid), b.date from tblProduct a, tblDelivery  b where a.pid = b.pid group by b.date