-
Notifications
You must be signed in to change notification settings - Fork 1
/
28b.sql
59 lines (59 loc) · 1.7 KB
/
28b.sql
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SELECT min(cn.name) AS movie_company,
min(mi_idx.info) AS rating,
min(t.title) AS complete_euro_dark_movie
FROM complete_cast AS cc,
comp_cast_type AS cct1,
comp_cast_type AS cct2,
company_name AS cn,
company_type AS ct,
info_type AS it1,
info_type AS it2,
keyword AS k,
kind_type AS kt,
movie_companies AS mc,
movie_info AS mi,
movie_info_idx AS mi_idx,
movie_keyword AS mk,
title AS t
WHERE cct1.kind = 'crew'
AND cct2.kind != 'complete+verified'
AND cn.country_code != '[us]'
AND it1.info = 'countries'
AND it2.info = 'rating'
AND k.keyword in ('murder',
'murder-in-title',
'blood',
'violence')
AND kt.kind in ('movie',
'episode')
AND mc.note not like '%(USA)%'
AND mc.note like '%(200%)%'
AND mi.info IN ('Sweden',
'Germany',
'Swedish',
'German')
AND mi_idx.info > '6.5'
AND t.production_year > 2005
AND kt.id = t.kind_id
AND t.id = mi.movie_id
AND t.id = mk.movie_id
AND t.id = mi_idx.movie_id
AND t.id = mc.movie_id
AND t.id = cc.movie_id
AND mk.movie_id = mi.movie_id
AND mk.movie_id = mi_idx.movie_id
AND mk.movie_id = mc.movie_id
AND mk.movie_id = cc.movie_id
AND mi.movie_id = mi_idx.movie_id
AND mi.movie_id = mc.movie_id
AND mi.movie_id = cc.movie_id
AND mc.movie_id = mi_idx.movie_id
AND mc.movie_id = cc.movie_id
AND mi_idx.movie_id = cc.movie_id
AND k.id = mk.keyword_id
AND it1.id = mi.info_type_id
AND it2.id = mi_idx.info_type_id
AND ct.id = mc.company_type_id
AND cn.id = mc.company_id
AND cct1.id = cc.subject_id
AND cct2.id = cc.status_id;