SELECT sales.id AS sales_id,product_id,sales.checkout_id,sale_timestamp,cashier_shifts.id AS shift_id,employee_id,start_timestamp AS shift_start_timestamp,end_timestamp AS shift_end_timestamp
INTO dtf.shifts_and_sales_78
FROM nexus_stores.sales
INNER JOIN nexus_stores.cashier_shifts ON sales.checkout_id = cashier_shifts.checkout_id
AND sales.store_id = 78
AND start_timestamp = timestamp '2059-12-01 13:00:00'
AND sale_timestamp >= start_timestamp
AND sale_timestamp < end_timestamp
