-
Notifications
You must be signed in to change notification settings - Fork 88
/
19b.sql
40 lines (39 loc) · 1.08 KB
/
19b.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
SELECT MIN(n.name) AS voicing_actress,
MIN(t.title) AS kung_fu_panda
FROM aka_name AS an,
char_name AS chn,
cast_info AS ci,
company_name AS cn,
info_type AS it,
movie_companies AS mc,
movie_info AS mi,
name AS n,
role_type AS rt,
title AS t
WHERE ci.note = '(voice)'
AND cn.country_code ='[us]'
AND it.info = 'release dates'
AND mc.note LIKE '%(200%)%'
AND (mc.note LIKE '%(USA)%'
OR mc.note LIKE '%(worldwide)%')
AND mi.info IS NOT NULL
AND (mi.info LIKE 'Japan:%2007%'
OR mi.info LIKE 'USA:%2008%')
AND n.gender ='f'
AND n.name LIKE '%Angel%'
AND rt.role ='actress'
AND t.production_year BETWEEN 2007 AND 2008
AND t.title LIKE '%Kung%Fu%Panda%'
AND t.id = mi.movie_id
AND t.id = mc.movie_id
AND t.id = ci.movie_id
AND mc.movie_id = ci.movie_id
AND mc.movie_id = mi.movie_id
AND mi.movie_id = ci.movie_id
AND cn.id = mc.company_id
AND it.id = mi.info_type_id
AND n.id = ci.person_id
AND rt.id = ci.role_id
AND n.id = an.person_id
AND ci.person_id = an.person_id
AND chn.id = ci.person_role_id;