rackhaelNear Social 6 - Near Horizon Charts copy
Updated 2023-06-30
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
29
30
31
32
33
34
35
36
›
⌄
-- forked from Ario / Near Social / Near Horizon Charts @ https://flipsidecrypto.xyz/Ario/q/Trrq5YhcdTCC/near-social-near-horizon-charts
-- Checkout more of Ario's work here : https://flipsidecrypto.xyz/Ario/dive-into-near-social-HiV4sg
WITH
SocialUser AS (
SELECT DISTINCT
signer_id as User_address,
date_trunc(week, BLOCK_TIMESTAMP)::date as date
FROM
near.social.fact_decoded_actions
),
HorizonUser AS (
SELECT DISTINCT
args:account_id as User_address,
date_trunc(week, BLOCK_TIMESTAMP)::date as date
FROM
near.horizon.fact_decoded_actions
),
SocialTXs AS (
SELECT
date_trunc(week, BLOCK_TIMESTAMP)::date as date,
COUNT(DISTINCT tx_hash) AS "# social tx"
FROM
near.social.fact_decoded_actions
GROUP BY 1
),
HorizonTXs AS (
SELECT
date_trunc(week, BLOCK_TIMESTAMP)::date as date,
COUNT(DISTINCT tx_hash) AS "# Horizon TXs"
FROM
near.horizon.fact_decoded_actions
GROUP BY 1
)
SELECT
a.date,
Run a query to Download Data