回答編集履歴

1

DISTINCTを追加

2021/02/23 09:59

投稿

neko_the_shadow
neko_the_shadow

スコア2349

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