回答編集履歴

1

調整

2023/02/21 11:23

投稿

yambejp
yambejp

スコア115495

test CHANGED
@@ -6,4 +6,11 @@
6
6
  from user
7
7
  group by m) as sub
8
8
  ```
9
-
9
+ もしくはこんな感じでも
10
+ ```SQL
11
+ select @a:=last_day(created_at) + interval 1 day - interval 1 month as m
12
+ ,count(*) as cnt
13
+ ,sum(count(*)) over (order by @a) as rui
14
+ from user
15
+ group by m
16
+ ```