Postgresql – Query to find unique time periods from list of time ranges
I have a table which looks like below: CREATE TABLE time_records ( id uuid NOT NULL, employee_id uuid NOT NULL, starttime timestampt NOT NULL, endtime timestampt NOT NULL ) There will be overlap in times between the records for the…