Query editor
WITHdate_series AS (SELECTDATE_TRUNC( 'day', CAST(day AS DATE) ) AS event_dayFROMUNNEST(sequence(CAST('2021-09-23' AS DATE),CURRENT_DATE,INTERVAL '1' DAY)) AS t(day)),users AS (SELECTfid,MIN( DATE_TRUNC('day', timestamp) ) AS first_cast_timestampFROMdune.neynar.dataset_farcaster_castsWHEREdeleted_at IS NULLAND parent_hash IS NULLAND fid = {{fid}}GROUP BYfidHAVINGCOUNT(*) >= 3),daily_users AS (SELECTd.event_day,u.fid,u.first_cast_timestampFROMdate_series dCROSS JOINusers uWHEREd.event_day >= u.first_cast_timestamp),reactions AS (SELECTDATE_TRUNC('day', rxn.timestamp) AS event_day,rxn.target_fid AS fid,COUNT(DISTINCT rxn.fid) AS reaction_countFROMdune.neynar.dataset_farcaster_casts castsINNER JOINdune.neynar.dataset_farcaster_reactions rxnON rxn.target_hash = casts.hashAND rxn.target_fid = casts.fidWHEREcasts.deleted_at IS NULLAND casts.parent_hash IS NULLAND rxn.deleted_at IS NULLAND rxn.target_fid = {{fid}}GROUP BY1,rxn.target_fid),