1
2
-- get the ${app_id} from game.app_id
SELECT * FROM games WHERE name = ${game_name}
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
-- developers
SELECT c.company_name
FROM developer d
LEFT JOIN company c ON c.company_id = d.company_id
WHERE d.app_id = ${app_id}
-- publishers
SELECT c.company_name
FROM publisher p
LEFT JOIN company c ON c.company_id = p.company_id
WHERE p.app_id = ${app_id}
-- genres
SELECT g.genre_name
FROM game_genre gg
LEFT JOIN genre g ON g.genre_id = gg.genre_id
WHERE gg.app_id = ${app_id}
-- categories
SELECT c.category_name
FROM game_category gc
LEFT JOIN category c ON gc.category_id = c.category_id
WHERE gc.app_id = ${app_id}
-- supported_languages
SELECT l.language_name
FROM supported_language sl
LEFT JOIN `language` l ON l.language_id = sl.language_id
WHERE sl.app_id = ${app_id}
-- all_audio_languages
SELECT l.language_name
FROM all_audio_language aal
LEFT JOIN `language` l ON l.language_id = aal.language_id
WHERE aal.app_id = ${app_id}
-- tags
SELECT t.tag_name, gt.agree_num
FROM game_tag gt
LEFT JOIN tag t ON t.tag_id = gt.tag_id
WHERE gt.app_id = ${app_id}