amelia-leeUntitled Query
Updated 2022-08-01
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 tb1 as (select
BLOCK_TIMESTAMP,
EVENT_INPUTS:to as users
from polygon.core.fact_event_logs
where ORIGIN_FROM_ADDRESS=ORIGIN_TO_ADDRESS
and ORIGIN_TO_ADDRESS='0x0000000000000000000000000000000000000000'
and EVENT_NAME='Transfer'
),
tb2 as (
select
x.block_timestamp,
x.tx_hash,
from_address as users
from polygon.core.fact_transactions x
join tb1 y on x.from_address = y.users and x.block_timestamp>y.block_timestamp
and from_address != '0x0000000000000000000000000000000000000000'
order by 1
),
tb3 as (select
distinct event_name as first_actions,
count(distinct tx_hash) as counts,
count(distinct origin_from_address) as users
from polygon.core.fact_event_logs
where tx_hash in (select tx_hash from tb2)
group by 1
having first_actions is not null
order by 2 desc limit 10)
select
block_timestamp::date as day,
event_name as first_action,
count(distinct tx_hash) as counts,
count(distinct origin_from_address) as users
Run a query to Download Data