blob: 9ab6dfbf69e9f325a11f2012a2c4f9ca9a7d3589 (
plain)
1
2
3
4
5
6
7
8
|
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
|