MLDZMNbl2-markets
Updated 2023-11-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
select
date_trunc('{{Time_basis}}',BLOCK_TIMESTAMP) as date,
CASE
when ARRAY_CONTAINS('CF4cPsGD2Pk65KPuGaroGHpEDamGQyyfhFTf2vJ1XLWr'::VARIANT, instruction:accounts) then 'SOL-USD'
when ARRAY_CONTAINS('J4AUYjRnmKgEm69EEd5ULzjtujK172myVU7KMxQLfaGD'::VARIANT, instruction:accounts) then 'BTC-USD'
when ARRAY_CONTAINS('DpGtevpseu9LwBsBXx3kNDrqK9PZkCddeDfx9YwzBA9z'::VARIANT, instruction:accounts) then 'ETH-USD'
when ARRAY_CONTAINS('HSdpqPFgDW6cTLgAqiq7MsUuX6TdR7jDmXCPST8yNycW'::VARIANT, instruction:accounts) then 'ETH0D230914'
when ARRAY_CONTAINS('3M5nwupU3oS1KRVk2tTNQ76kzpnHsbH9cLmXpr17powQ'::VARIANT, instruction:accounts) then 'BITCOIN0D230914'
end as markets,
count(*) as "Transactions",
count(distinct signers[0]) as "Users"
from solana.core.fact_events
where succeeded = True
and program_id = 'FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL'
and ARRAY_CONTAINS('4cKB5xKtDpv4xo6ZxyiEvtyX3HgXzyJUS1Y8hAfoNkMT'::VARIANT, instruction:accounts) --BLUECHIP MPG
and BLOCK_TIMESTAMP >= current_date-{{Days_back}}
group by 1,2 having markets is not null
Run a query to Download Data