Query editor
-- ===========================-- AUTHOR: Solomon Gift Amunde-- AUTHOR BIO: Onchain, blockchain and crypto data analyst-- PROJECT: Onchain participation in the Dangote refinery IPO valued at over $40 billion-- ===========================with cngn_transfers as (select evt_tx_hash, evt_block_time, "from", value / 1e6 as cngn_spentfrom erc20_base.evt_Transferwhere contract_address = 0x46C85152bFe9f96829aA94755D9f915F9B10EF5Fand evt_block_time >= timestamp '2026-09-14'),dpri_transfers as (select evt_tx_hash, "to", value / 1e18 as dpri_receivedfrom erc20_base.evt_Transferwhere contract_address = 0xc68b460fe4c916Fd17d6ab6b181A409C763002d9and evt_block_time >= timestamp '2026-09-14')selectdate_trunc('day', c.evt_block_time) as day,count(distinct c."from") as unique_buyers,count(*) as purchase_count,sum(c.cngn_spent) as total_cngn_spent,sum(d.dpri_received) as total_dpri_received,sum(c.cngn_spent) / nullif(sum(d.dpri_received), 0) as avg_dpri_price_ngnfrom cngn_transfers cjoin dpri_transfers don c.evt_tx_hash = d.evt_tx_hashand c."from" = d."to"group by 1order by 1-- This code will sort all users cngn spent to purchase dpri token on base chain-- from september 14th 2026 when the dangote refinery IPO went live-- the query will enable us see how the users have engaged with the onchain assset and its price actiion