maybeyonasmoonbirds_crossover_stats
Updated 2022-05-03
999
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
to_moonbirds as (
select
event_inputs:to::string as user,
'to' as direction,
event_inputs:tokenId::string as token_id
from ethereum_core.fact_event_logs
where contract_address = '0x23581767a106ae21c074b2276d25e5c3e136a68b'
and event_name = 'Transfer'
),
from_moonbirds as (
select
event_inputs:from::string as user,
'from' as direction,
event_inputs:tokenId::string as token_id
from ethereum_core.fact_event_logs
where contract_address = '0x23581767a106ae21c074b2276d25e5c3e136a68b'
and event_name = 'Transfer'
),
moonbird_bals as (
select
user,
sum(
case when direction='from' then -1
when direction='to' then 1
else 0 end
) as balances
from (
select * from to_moonbirds
union all
select * from from_moonbirds
)
group by 1
),
total_moonbirds as (
select
Run a query to Download Data