Query editor
withcomplete as (select created_at, fid, 0 as reaction_typefrom dune.neynar.dataset_farcaster_castsunionselect created_at, fid, reaction_typefrom dune.neynar.dataset_farcaster_reactions),total_casts_by_user as (selectdate_trunc('month', created_at) as month, fid, count(*) as castsfrom completewhere reaction_type = 0group by 1,2order by 1 desc),total_likes_by_user as (selectdate_trunc('month', created_at) as month, fid, count(*) as likesfrom completewhere reaction_type = 1group by 1,2order by 1 desc),total_recasts_by_user as (selectdate_trunc('month', created_at) as month, fid, count(*) as recastsfrom completewhere reaction_type = 2group by 1,2order by 1 desc),total_by_user as (selectCOALESCE(a.month,b.month,c.month) as month, coalesce(a.fid,b.fid,c.fid) as fid, a.casts, b.likes, c.recastsfrom total_casts_by_user afull join total_likes_by_user bon a.fid = b.fid-- and a.month = b.monthfull join total_recasts_by_user con b.fid = c.fidfull join total_recasts_by_user don a.fid = d.fid--and b.month = c.month)