Skip to content
Advertisement

Select data where sum for last 7 from max-date is greater than x

I have a data set as such:

Like this:

Here’s the query i tried,

This is clearly not right. What is a simple way to do this?

Advertisement

Answer

Find the max date by type. Then used it to find last 7 days and sum() the value.

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