shadilGetting Your Feet Wet, Part 2
Updated 2022-03-06
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with new_users as (
select
count(DISTINCT trx.tx_from[0]) as count_new_users,
min(trx.block_timestamp)::date as min_date,
msg.msg_value:contract as platform
from terra.transactions trx
join terra.msgs msg on trx.tx_id = msg.tx_id
where date(trx.block_timestamp) >= CURRENT_DATE-90
group by platform having min_date>=CURRENT_DATE-90
)
select sum(count_new_users) as total_new_users, lbs.label as platform_label
from new_users nu
left join terra.labels lbs on lbs.address = nu.platform
where lower(platform_label) in ('anchor','mirror', 'pylon', 'astroport', 'terraswap', 'prism', 'mars')
group by platform_label
order by total_new_users DESC
Run a query to Download Data