Skip to content
Advertisement

Adding all dates to SQL query for grouped dates

I would like SQL to return all dates, whether or not they are null or 0 from the following query:

Current Output:

Desired Output:

I do not have another table with dates to reference My min should be the first date pulled from the query (in this case, 01/02/22) and then my max should be the most recent date that the logic applies to (in this case, 01/07/22) is this possible without the creation of another table?

Advertisement

Answer

Consider below approach

if applied to sample data in your question – output is

enter image description here

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement