-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjoinMock.sql
More file actions
39 lines (38 loc) · 744 Bytes
/
joinMock.sql
File metadata and controls
39 lines (38 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SELECT
f.*,
fc.*,
ca.*,
l.*,
i.inventory_id,
i.film_id,
i.last_update,
r.inventory_id,
r.rental_id,
r.rental_date,
r.customer_id,
r.return_date,
r.last_update,
cu.customer_id,
cu.first_name,
cu.last_name,
cu.email,
cu.activebool,
cu.create_date,
cu.active,
cu.last_update
FROM
public.film f
LEFT JOIN public.film_category fc
ON f.film_id = fc.film_id
LEFT JOIN public.category ca
ON fc.category_id = ca.category_id
LEFT JOIN public.language l
ON f.language_id = l.language_id
LEFT JOIN public.inventory i
ON f.film_id = i.film_id
LEFT JOIN public.rental r
ON i.inventory_id = r.inventory_id
LEFT JOIN public.customer cu
ON r.customer_id = cu.customer_id
LIMIT
5