Query editor
with iv_wl_wallet (address, promocode) as (-- The purchase address below is marked as having a promocode applied at the request of the relevant party.values (0x07e0d811f266b7f65fd022ba4bdab562ce067420,'meritcircle'),(0xC4218226A5406Aa721EAEBc2D9dA9564AEdd7777,'meritcircle'),(0x75A3820eE3F245Ecd4b77EB9b28fe5F8bfF77f15,'meritcircle'),(0xffb37002aeba61f23331b743e8318397bb27210d,'buildercapital'))select t.block_time,t.tx_hash as tx_hash,a.*,t."from" as buyer,case when varbinary_starts_with(input, 0x2316448c) then 'wl'when varbinary_starts_with(input, 0xa54bd56d) then 'wl_code'when w.address is not null then 'wl_code'end as code_yn,varbinary_to_decimal(varbinary_ltrim(varbinary_substring(input, 5, 32)))/1e18 as price,round(i.eth_price,4) as unit_price,case when i.eth_price > 0 then round(varbinary_to_decimal(varbinary_ltrim(varbinary_substring(input, 5, 32)))/1e18 / round(i.eth_price,4),1) end as amount,case when varbinary_starts_with(input, 0xa54bd56d) then from_utf8(varbinary_rtrim(varbinary_substring(input, varbinary_length(input)-32+1, 32)))when w.address is not null then w.promocodeend as with_codefrom query_3536864 ainner join arbitrum.traces t on t.to = a.contract_addressand t.block_time >= timestamp '2024-03-01'and t.successleft join query_3537115 i on i.tier = a.tierleft join iv_wl_wallet w on w.address = t."from"where ( varbinary_starts_with(input, 0x2316448c) -- Whitelisted Purchaseor varbinary_starts_with(input, 0xa54bd56d) -- Whitelisted Purchase with Code)order by t.block_time desc