Query editor
WITH tips AS (SELECTDATE_TRUNC('day', casts.timestamp - INTERVAL '35' MINUTE) AS event_day,casts.hash,casts.parent_hash,casts.root_parent_url,casts.timestamp,casts.parent_fid AS recipient_fid,casts.fid AS donor_fid,casts.embeds,'regular' AS tip_type,CAST(REGEXP_EXTRACT(REGEXP_EXTRACT(UPPER(casts.text), '([0-9]+) \$DEGEN'), '[0-9]+') AS DOUBLE) AS tip_amountFROMdune.neynar.dataset_farcaster_casts castsWHEREcasts.fid NOT IN (217745, 234434, 244128, 364927) -- Exclude @degenbot, @degentip, @degentokenbase, @paybotAND casts.parent_fid NOT IN (364927) -- Exclude @paybotAND COALESCE(ARRAY_POSITION(casts.mentions, 364927), 0) = 0 -- Exclude @paybotAND REGEXP_LIKE(UPPER(casts.text), '[0-9]+ \$DEGEN')AND casts.parent_hash IS NOT NULLAND casts.timestamp - INTERVAL '35' MINUTE >= TO_DATE('20250728', 'yyyymmdd')--AND casts.timestamp - INTERVAL '35' MINUTE < TO_DATE('20250305', 'yyyymmdd')AND casts.parent_fid <> casts.fid)---- Regular Tips--SELECTevent_day,hash,parent_hash,root_parent_url,"timestamp",recipient_fid,donor_fid,embeds,tip_type,tip_amountFROMtipsUNION ALL---- Bonus Tips for Degen Frame Devs--SELECTtips.event_day,tips.hash,tips.parent_hash,tips.root_parent_url,tips."timestamp",CASEWHEN LOWER(parent_casts.embeds) LIKE LOWER('%blurry.is-frame.art/frame%') THEN 417554WHEN LOWER(parent_casts.embeds) LIKE LOWER('%degen-v2.vercel.app%') THEN 268438WHEN LOWER(parent_casts.embeds) LIKE LOWER('%launch-degen.vercel.app%') THEN 268438WHEN LOWER(parent_casts.embeds) LIKE LOWER('%degen.genyframe.xyz%') THEN 321969WHEN LOWER(parent_casts.embeds) LIKE LOWER('%stats-frame.degen.tips%') THEN 11124WHEN LOWER(parent_casts.embeds) LIKE LOWER('%dailydegenstats.vercel.app%') THEN 245124WHEN LOWER(parent_casts.embeds) LIKE LOWER('%degen-stats-frame.vercel.app%') THEN 245124WHEN LOWER(parent_casts.embeds) LIKE LOWER('%degentop.altumbase.com%') THEN 366713WHEN LOWER(parent_casts.embeds) LIKE LOWER('%degen.altumbase.com%') THEN 366713