Got below table structure.
Table1
ServiceID Activity_type Start_date End_date
1 Long Day Care 12/03/2012 12/03/2020
1 Family Day Care 12/03/2012 12/03/2020
2 Vacation Care 12/05/2012 12/03/2020
2 Before School Care 12/05/2012 12/03/2020
3 Long Day Care 12/09/2012 12/03/2020
3 Vacation Care 12/09/2012 12/03/2020
3 After School Care 12/09/2012 12/03/2020
Now I want to display blank Activity_type when service doesn't have Activity like get all the distinct Activity_type and if the service don't have that activity then display the record with ServiceId , Start_date, End_Date and a blank Activity_type. I want total rows for each service = total count of distinct Activity type.
Output should be like below. for each service has five rows as total count of distinct activity type is 5 here.
ServiceID Activity_type Start_date End_date
1 Long Day Care 12/03/2012 12/03/2020
1 Family Day Care 12/03/2012 12/03/2020
1 12/03/2012 12/03/2020
1 12/03/2012 12/03/2020
1 12/03/2012 12/03/2020
2 Vacation Care 12/05/2012 12/03/2020
2 Before School Care 12/05/2012 12/03/2020
2 12/05/2012 12/03/2020
2 12/05/2012 12/03/2020
2 12/05/2012 12/03/2020
3 Long Day Care 12/09/2012 12/03/2020
3 Vacation Care 12/09/2012 12/03/2020
3 After School Care 12/09/2012 12/03/2020
3 12/09/2012 12/03/2020
3 12/09/2012 12/03/2020
Any help???