How to count the number of campaigns per day based on the start and end dates of the campaigns in SQL Spark Databrick

dulu
New Contributor III

I need to count the number of campaigns per day based on the start and end dates of the campaigns

Input Table:

image 1 

Out needed (result):

image 2How do I need to write the SQL command in databricks to get the above result? thanks all