Sbhn_NPthoughtless-azure
Updated 2025-02-16
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
WITH price as (
select hour::date as datee,
avg(price) as usdprice
from crosschain.price.ez_prices_hourly
where symbol = 'OLAS'
group by 1)
select
from_address as "Staker",
concat('0x',substr(data,27,40)) as "Multisig",
concat('0x', right(data,40)) as "StakingInstance",
ethereum.public.udf_hex_to_int(substr(topics[2],3,len(topics[2]))) as "Social ID",
ethereum.public.udf_hex_to_int(substr(topics[3],3,len(topics[3]))) as "Service ID",
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)
left join price on block_timestamp::date = datee
where topics[0] = '0x2c50df9a1dea57a91edc18dc7b7d135675e66bca942cb9ab6009bc7647f09c64'
and to_address in ('0x343f2b005cf6d70ba610cd9f1f1927049414b582','0xaea9ef993d8a1a164397642648df43f053d43d85')
group by 1,2,3,4,5
QueryRunArchived: QueryRun has been archived