回答編集履歴
1
DISTINCTを追加
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
```SQL
|
26
26
|
|
27
|
-
SELECT CASE WHEN to_user_id = 4 THEN from_user_id ELSE to_user_id END
|
27
|
+
SELECT DISTINCT CASE WHEN to_user_id = 4 THEN from_user_id ELSE to_user_id END
|
28
28
|
|
29
29
|
FROM message
|
30
30
|
|