binhachonL1 Unique Users - Transactions
Updated 2022-03-12
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 transaction_table as (
select
'Ethereum' as blockchain,
date_trunc('day', block_timestamp) as time,
count(distinct origin_address) as "Number of unique users"
from ethereum.udm_events
where block_timestamp >= '2022-02-01 00:00:00.000'
group by blockchain, time
union all
select
'Terra' as blockchain,
date_trunc('day', block_timestamp) as time,
count(distinct tx_from) as "Number of unique users"
from terra.transactions
where block_timestamp >= '2022-02-01 00:00:00.000'
group by blockchain, time
union all
select
'Solana' as blockchain,
date_trunc('day', block_timestamp) as time,
count(distinct tx_from_address) as "Number of unique users"
from solana.transactions
where block_timestamp >= '2022-02-01 00:00:00.000'
group by blockchain, time
),
first_week as (
select
*,
row_number() over (partition by blockchain order by time) as rank
from transaction_table
qualify rank = 1
)
select
transaction_table.*,
transaction_table."Number of unique users" * 100 / first_week."Number of unique users" as percentage
from transaction_table
Run a query to Download Data