Credits: Jonathan Katz: Lets Build a Complex Real Time Data Management Application -- PGCon 2018
Start with the following table:
create table bookings (
id int generated by default as identity primary key,
start_time timestamptz not null,
end_time timestamptz not null,