質問するログイン新規登録

回答編集履歴

1

修正

2018/07/19 09:13

投稿

PineMatsu
PineMatsu

スコア3581

answer CHANGED
@@ -3,7 +3,7 @@
3
3
  COUNT(flag = 0 or null) as num0,
4
4
  COUNT(flag = 1 or null) as num1,
5
5
  COUNT(flag = 0 or 1) as total,
6
- CAST(COUNT(flag = 1 or null) * 100) as real
6
+ CAST(COUNT(flag = 1 or null) * 100 as real)
7
7
  / CAST(COUNT(flag = 0 or 1) as real) as winning_p
8
8
  FROM lottery
9
9
  GROUP BY user_id;