I have two tables Registration_Table and ApplicationStatus_Table. I have taken one column only from Registration_Table for understanding purpose. In ApplicationStatus_Table based on dates of Registrationdate and FinalSubmissiondate check the status.
Registration_Table
Registrationdate
-----------------------
2016-12-22 12:52:48.493
2016-12-21 15:05:24.533
ApplicationStatus_Table
FinalSubmissiondate InnovationStatus
-------------------------------------------------
2016-12-22 12:52:48.493 Completed
2016-12-21 15:05:24.533 11
I need result like below.
Registrationdate RegistrationsCount InnovationsStatus
----------------------------------------------------------
2016-12-22 1 1
2016-12-21 1 0
I need result on particular date how many Registrations and InnovationsStatus. If InnovationStatus completed means 1 and others all 0.