Sbhn_NPideal-rose
Updated 2025-02-17
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH price as (
select hour::date as datee,
avg(price) as usdprice
from crosschain.price.ez_prices_hourly
where symbol = 'OLAS'
group by 1),
tab1 as (
select DISTINCT tx_hash
from crosschain.olas.ez_olas_staking
limit 100
)
select date_trunc('day',block_timestamp) as date,
case when nft_to_address = '0xe2e68ddafbdc0ae48e39cdd1e778298e9d865cf4' then 'Contribute Beta 1'
when nft_to_address = '0x6ce93e724606c365fc882d4d6dfb4a0a35fe2387' then 'Contribute Beta 2'
when nft_to_address = '0x28877ffc6583170a4c9ed0121fc3195d06fd3a26' then 'Contribute Beta 3'
when nft_to_address = '0x95146adf659f455f300d7521b3b62a3b6c4aba1f' then 'Contribute Alpha 1'
when nft_to_address = '0x2c8a5ac7b431ce04a037747519ba475884bce2fb' then 'Contribute Alpha 2'
when nft_to_address = '0x708e511d5fcb3bd5a5d42f42aa9a69ec5b0ee2e8' then 'Contribute Alpha 3' end as operator,
count(DISTINCT from_address) as stakers,
sum(amount) as staked_olas,
sum(amount*usdprice) as staked_usd
from base.core.fact_event_logs
join base.core.ez_token_transfers b using(tx_hash)
join base.nft.ez_nft_transfers using(tx_hash)
left join price on block_timestamp::date = datee
where topics[0] = '0xec97633905b1dbe9773a7536e9a986dcf89803e1193934b7b6d76587c68beb40'
and to_address in ('0x343f2b005cf6d70ba610cd9f1f1927049414b582','0xaea9ef993d8a1a164397642648df43f053d43d85')
and nft_from_address in ('0x343f2b005cf6d70ba610cd9f1f1927049414b582','0xaea9ef993d8a1a164397642648df43f053d43d85')
and nft_to_address in ('0xe2e68ddafbdc0ae48e39cdd1e778298e9d865cf4',
'0x6ce93e724606c365fc882d4d6dfb4a0a35fe2387',
'0x28877ffc6583170a4c9ed0121fc3195d06fd3a26',
'0x95146adf659f455f300d7521b3b62a3b6c4aba1f',
'0x2c8a5ac7b431ce04a037747519ba475884bce2fb',
'0x708e511d5fcb3bd5a5d42f42aa9a69ec5b0ee2e8')
QueryRunArchived: QueryRun has been archived