Replies: 2 comments
-
This is a question about writing a query for PostgreSQL, not a question about Redash. Closing |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @Weshag, The query results data source uses SQLite - which doesn't support |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using two saved PGSQL queries. Example using query_111 which is start and end (days, weeks, months, your choice) with a lateral join to query_222 counting events based on the periods from query_111. My attempts all seem to fail with an error.
select intervals.start
, intervals.end
, Summary.*
from query_111 intervals
left join lateral
(select
sum(case when (created < intervals.end) then 1 else 0 end) as active
sum(case when (closed > intervals.start) and (closed < intervals.end) then 1 else 0 end) as closed
from query_222
) Summary on true
Beta Was this translation helpful? Give feedback.
All reactions