Afonso_Diaz2023-08-16 11:32 PM
Updated 2023-08-16
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
›
⌄
with t1 as (
select
tx_hash,
block_timestamp,
datediff('day', block_timestamp, current_date) as wallet_age,
tx_receiver as sweat_wallet
from near.core.fact_transfers
where tx_signer ilike any ('%sweat_oracle_%', 'sweat_welcome.near')
and not tx_receiver ilike any ('%sweat_oracle_%', 'sweat_welcome.near')
and (deposit::numeric/1e24) < 0.06
and status = 1
)
select
project_name,
count(distinct tx_hash) as transactions,
count(distinct signer_id) as users
from near.core.fact_actions_events a
join near.core.dim_address_labels b
on a.receiver_id = b.address
where signer_id in (select distinct sweat_wallet from t1)
and label_type not in ('token', 'cex')
and label_subtype != 'token_contract'
and project_name != 'near'
group by 1
order by 2 desc
limit 10
Run a query to Download Data