nimble-metamaskTop 10 contracts daily overall (NEAR)
Updated 2022-07-27
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
›
⌄
with top10 AS (
SELECT
TX_RECEIVER AS "Top 10 Contracts",
SUM (GAS_USED)/1e12 AS "Total Gas Used (TGas)",
SUM (TRANSACTION_FEE)/1e24 AS "Total fee (Ⓝ)",
COUNT (TXN_HASH) AS "The number of transactions",
"Total Gas Used (TGas)"/"The number of transactions" AS "Average Gas Used",
"Total fee (Ⓝ)"/"The number of transactions" AS "Average fee paid"
FROM flipside_prod_db.mdao_near.transactions
GROUP BY 1
ORDER BY 2 DESC
LIMIT 10
)
SELECT
date_trunc('day', BLOCK_TIMESTAMP) AS DATE,
t."Top 10 Contracts",
SUM (GAS_USED)/1e12 AS "Total daily Gas Used (TGas)",
SUM (TRANSACTION_FEE)/1e24 AS "Total daily fee (Ⓝ)",
COUNT (TXN_HASH) AS "The number of daily transactions",
"Total daily Gas Used (TGas)"/"The number of daily transactions" AS "Average daily Gas Used",
"Total daily fee (Ⓝ)"/"The number of daily transactions" AS "Average daily fee paid"
FROM top10 t
JOIN flipside_prod_db.mdao_near.transactions n
ON t."Top 10 Contracts" = n.TX_RECEIVER
GROUP BY 1,2
ORDER BY 1 DESC
Run a query to Download Data