Query editor
WITHusdc AS (SELECTevt_block_time as date,airdropRecipient,SUM(amount / 1000000.0) as usd_amountFROMpolymarket_usdc_merkle_distributor_polygon.MerkleDistributor_evt_ClaimedGROUP BY1,2),usdc_new as (selectevt_block_time as date,to as airdropRecipient,SUM(CAST(value as DOUBLE) / 1000000.0) as usd_amountfromerc20_polygon.evt_Transferwhere"from" = 0xc288480574783BD7615170660d71753378159c47and contract_address = 0x2791bca1f2de4661ed88a30c99a7a9449aa84174group by1,2),rewards as (select*fromusdcUNIONselect*fromusdc_new)selectDATE_TRUNC('week', date) as date,COUNT(DISTINCT airdropRecipient) as users,SUM(usd_amount) as amountfromrewardswheredate >= CAST('2024-09-01' AS TIMESTAMP)group by1order by1