diff options
Diffstat (limited to 'graphs/sql/where_is_waldo/req06.sql')
| -rw-r--r-- | graphs/sql/where_is_waldo/req06.sql | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/graphs/sql/where_is_waldo/req06.sql b/graphs/sql/where_is_waldo/req06.sql new file mode 100644 index 0000000..8a7a35e --- /dev/null +++ b/graphs/sql/where_is_waldo/req06.sql @@ -0,0 +1,20 @@ +SELECT + e.id AS employee_id, + person_id, + first_name, + last_name +FROM nexus_stores.employees AS e +INNER JOIN public.people AS p + ON e.person_id = p.id +WHERE + e.id NOT IN ( + SELECT employee_id + FROM nexus_stores.cashier_shifts + INNER JOIN nexus_stores.employees + ON employee_id = employees.id AND position = 'CASHIER' + WHERE + start_timestamp = timestamp '2059-12-01 13:00:00' + AND cashier_shifts.store_id = 78 + ) + AND e.position = 'CASHIER' + AND e.store_id = 78 |
