adriaparcerisasnear learn interactions 2
Updated 2024-05-13Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with
destinations as (
SELECT
trunc(block_timestamp,'week') as date,
--method_name as action,
project_name as destination,
count(distinct tx_hash) as transactions,
sum(transactions) over (partition by destination order by date) as cum_transactions,
sum(ATTACHED_GAS / power(10, 24)) as near_gas_spent,
sum(near_gas_spent) over (partition by destination order by date) as total_near_gas_spent,
avg(ATTACHED_GAS / power(10, 24)) as avg_near_gas_spent
FROM near.core.fact_actions_events_function_call x
join near.core.dim_address_labels y on x.receiver_id=y.address
WHERE signer_id LIKE '%learnclub.near'
group by 1,2 order by 1 asc
--login,learnernft,share,redeem,referral,referralnft,nftcertv1,nftcert
)
select * from destinations where destination is not null order by 1 asc
QueryRunArchived: QueryRun has been archived