回答編集履歴
2
追記
answer
CHANGED
@@ -18,6 +18,7 @@
|
|
18
18
|
```
|
19
19
|
追記
|
20
20
|
--
|
21
|
+
上記のexists使用版
|
21
22
|
```SQL
|
22
23
|
SELECT * FROM hotels t1
|
23
24
|
WHERE exists (
|
1
追記
answer
CHANGED
@@ -15,4 +15,14 @@
|
|
15
15
|
SELECT hotel_id, country_code from areas
|
16
16
|
where area like '%地名%'
|
17
17
|
)
|
18
|
+
```
|
19
|
+
追記
|
20
|
+
--
|
21
|
+
```SQL
|
22
|
+
SELECT * FROM hotels t1
|
23
|
+
WHERE exists (
|
24
|
+
SELECT 1 from areas
|
25
|
+
where hotel_id = t1.hotel_id and country_code = t1.country_code
|
26
|
+
and area like '%地名%'
|
27
|
+
)
|
18
28
|
```
|