skip to Main Content

Group multiple events for ID in postgreSQL data

I'm trying to select pairs of events from my data. I have a data that looks like this: create table test(id,status,created)as values (1, 'on','2024-09-01'::date) ,(2, 'on','2024-09-02'::date) ,(1,'off','2024-09-03'::date) ,(1, 'on','2024-09-04'::date) ,(2,'off','2024-09-05'::date) ,(3, 'on','2024-09-06'::date) ,(1,'off','2024-09-07'::date) ,(4,'off','2024-09-08'::date); I would like to have data…

VIEW QUESTION
Back To Top
Search