Avatar of aej1973
aej1973

asked on 

count with join statement...

I have two tables as follows:
Table-01
id               Date
1001      11/1/2014
1002      12/1/2014
1003      11/12/2014
1004      11/28/2014
1005      11/14/2014
1006      11/29/2014
1007      11/14/2014
1008      12/10/2014
1009      12/12/2014
1010      12/12/2014
1011      12/8/2014

Table-02
id             status
1001      Started
1002      Started
1003      Started
1004      In Progress
1005      Complete
1006      Complete
1007      Complete
1007      Approved
1008      Approved
1009      Approved
1010      Complete
1011      Complete

I need to get an output that will be give me the count status depending on the date from table-01.

For eg, If I need the count of status for date >= 12/12/2014, I am looking for an output as follows:

Approve  1
Completed 1
Started  null
in Progress null

Can someone let me know how this can be done, thank you.

A
MySQL Server

Avatar of undefined
Last Comment
aej1973

8/22/2022 - Mon