vegardTx Count by Contract Interacted on NEAR
Updated 2022-09-19
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 list1 as (
select
block_timestamp::date as date,
tx_receiver as receiver,
count(distinct (tx_hash)) as txn_count
from near.core.fact_transactions
where block_timestamp >= '2022-09-03'
and tx_status = 'Success'
and tx_receiver != '65ca40c4de59b439db917daf9f527f605b448b3f5c6d5777d0b83a78e8dcf062'
group by date, receiver
),
list2 as (
select date,
receiver,
rank() over (partition by date order by txn_count desc) as rate,
txn_count
from list1
)
select
date,
case when rate >= 10 then 'Other Apps' else receiver end as application,
sum(txn_count) as txn_count
from list2
group by 1, 2
order by 1 asc
Run a query to Download Data