adriaparcerisasRhea Finance exchange on Near 2025
Updated 2025-03-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
›
⌄
WITH
t1 as (
select
trunc(block_timestamp,'{{granularity}}') as date,
count(distinct tx_signer) as users
FROM near.core.fact_transactions
where tx_succeeded = 'TRUE'
group by 1
),
t2 as(
SELECT
trunc(block_timestamp,'{{granularity}}') as date,
count(distinct tx_signer) as users
FROM near.core.fact_transactions
WHERE tx_receiver = 'v2.ref-finance.near' and tx_succeeded = 'TRUE'
group by 1
)
SELECT
ifnull(t1.date,t2.date) as date,
ifnull(t1.users,0) as near_users,
ifnull(t2.users,0) as ref_users,
ref_users/near_users as share_rate
from t1
left join t2 on t1.date=t2.date
where t1.date>=CURRENT_DATE-INTERVAL '{{period}}' and t1.date<current_date
order by 1 asc
QueryRunArchived: QueryRun has been archived