Query editor
WITH ReactionCounts AS (SELECTtarget_hash,SUM(CASE WHEN reaction_type = 1 THEN 1 ELSE 0 END) AS like_count,SUM(CASE WHEN reaction_type = 2 THEN 1 ELSE 0 END) AS recast_countFROM dune.neynar.dataset_farcaster_reactionsGROUP BYtarget_hash), CommentCounts AS (SELECTparent_hash,COUNT(*) AS comment_countFROM dune.neynar.dataset_farcaster_castsWHERENOT parent_hash IS NULLGROUP BYparent_hash)SELECTc.text,c.timestamp,COALESCE(rc.like_count, 0) AS like_count,COALESCE(rc.recast_count, 0) AS recast_count,COALESCE(cc.comment_count, 0) AS comment_countFROM dune.neynar.dataset_farcaster_casts AS cLEFT JOIN ReactionCounts AS rcON c.hash = rc.target_hashLEFT JOIN CommentCounts AS ccON c.hash = cc.parent_hashWHEREc.fid = 533 AND LOWER(c.text) LIKE '%imgur%'ORDER BYc.timestampLIMIT 1000