bertaUntitled Query
Updated 2022-12-24Copy 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
23
›
⌄
--credit : https://app.flipsidecrypto.com/velocity/queries/c1b98c39-55ec-4527-994c-c6191f35a0cf
WITH tab1 as (
SELECT
CONTRACT_NAME,
tx_hash
FROM ethereum.core.ez_nft_mints
LEFT outer JOIN ethereum.core.dim_nft_metadata
ON contract_address = nft_address
WHERE NOT TOKEN_NAME is NULL
GROUP BY 1,2
)
SELECT
date_trunc('week', block_timestamp) as week,
sum(TX_FEE),
avg(TX_FEE)
FROM tab1 a
LEFT outer JOIN ethereum.core.fact_transactions b
on a.tx_hash = b.tx_hash
--LIMIT 100
WHERE STATUS LIKE 'SUCCESS'
GROUP BY 1
Run a query to Download Data