Yousefi_1994Terra 6 - Daily Transactions by New User
Updated 2023-01-10
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 new_users as (
select
tx_sender as wallet_address,
min(block_timestamp)::date as creation_date
from terra.core.fact_transactions
group by wallet_address
),
new_user_list as (
select
wallet_address,
creation_date
from new_users
where creation_date >= '2022-12-12'
and creation_date < '2023-01-7'
),
transactions as (
select
block_timestamp,
tx_id,
tx_sender,
fee
from terra.core.fact_transactions
where block_timestamp::date >= '2022-12-12'
and block_timestamp::date < '2023-01-7'
),
final_result as (
select
block_timestamp,
case
when tx_sender in (select wallet_address from new_user_list) then 'By New Users'
else 'By Old Users'
end as "Users Type",
case
when block_timestamp::date >= '2022-12-12' and block_timestamp::date < '2022-12-25' then 'Before Christmas Holidays'
when block_timestamp::date >= '2022-12-25' and block_timestamp::date < '2023-01-07' then 'Christmas Holidays'
end as "Period",
Run a query to Download Data