puriflive query example
Updated 2024-08-25
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 zk_airdrop AS (
select
value:user as user,
value:amount_claimed::int as amount_claimed
from
((select
chainbase_utils.post(
'/v1/dw/query'
,
{'query':
'
select to_address as user, sum(value/1e18) as amount_claimed
from zksync.token_transfers
where contract_address = "0x5a7d6b2f92c77fad6ccabd7ee0624e64907eaf3e"
and from_address = "0x0000000000000000000000000000000000000000"
group by 1
'
}
)::variant as d ) ) ,
lateral flatten(input => d:data:data:result)
),
badge_minters as (
select
distinct minter as minter,
count(badge_id) as minted_badges
from
(
select
decoded_log ['to'] as minter,
decoded_log ['id'] as badge_id
from
berachain.testnet.fact_decoded_event_logs
where
CONTRACT_ADDRESS = lower('0x886D2176D899796cD1AfFA07Eff07B9b2B80f1be')
and decoded_log ['from'] = lower('0x0000000000000000000000000000000000000000')
)
QueryRunArchived: QueryRun has been archived