39 ms·
I agree. There is something magic with CTEs, just moving things around a little bit makes it so much easier to comprehend. You could even move the val and lag(
by fifilura 5y ago
I agree. There is something magic with CTEs, just moving things around a little bit makes it so much easier to comprehend.
You could even move the val and lag(val) to two different columns and do the abs() in the summary.
That way you can query temperature_delta_past_day and see for yourself what it does.