回答編集履歴

2

typo

2022/09/07 02:22

投稿

shiketa
shiketa

スコア3971

test CHANGED
@@ -16,5 +16,5 @@
16
16
  union allで連結し、
17
17
  件数を数え、
18
18
  件数とデータをidでjoinし、
19
- 件数の順に並び替え、
19
+ 件数の順に並び替え、
20
20
  件数を取り除く。

1

typo

2022/09/07 02:21

投稿

shiketa
shiketa

スコア3971

test CHANGED
@@ -6,7 +6,7 @@
6
6
  d as (SELECT id FROM data where 読み like '%た'),
7
7
  p as (select * from a union all select * from b union all select * from c union all select * from d),
8
8
  x as (select count(*) _cnt, id from p group by id),
9
- y as (select x._cnt, m.* from x join data m on m.id = x.id),
9
+ y as (select x._cnt, data.* from x join data on data.id = x.id),
10
10
  z as (select distinct * from y order by _cnt desc)
11
11
  select id, 読み from z;
12
12
  ```