Skip to content

Instantly share code, notes, and snippets.

@hashcc
Created November 1, 2021 00:41
Show Gist options
  • Save hashcc/ac4a693ed81ec6c8d908469c265d8af2 to your computer and use it in GitHub Desktop.
Save hashcc/ac4a693ed81ec6c8d908469c265d8af2 to your computer and use it in GitHub Desktop.
with
recipes_count as (
select
ユーザーID,
count(レシピID) as レシピ投稿数
from
recipes
group by
ユーザーID
order by
レシピ投稿数 desc
),
tsukurepos_count as (
select
ユーザーID,
count(つくれぽID) as つくれぽ投稿数
from
tsukurepos
group by
ユーザーID
order by
つくれぽ投稿数 desc
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment