ChiefAgg NFT Block Space
Updated 2023-04-19
999
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 Agg Defi Block Space @ https://flipsidecrypto.xyz/edit/queries/a628498d-a995-4357-b0fd-34b48d8a019e
WITH labels AS (
SELECT
block_timestamp,
tx_id,
-- index,
-- inner_instruction,
CASE when address_name is null then address ELSE address_name END as address_name
-- label_type
-- label_subtype
FROM
solana.core.dim_labels l
JOIN (SELECT distinct tx_id, program_id, block_timestamp
-- index, inner_instruction
FROM solana.core.fact_events
WHERE block_timestamp > '2023-04-17') e
ON l.address = e.program_id
-- WHERE label LIKE '%Defi%'
WHERE label_type = 'nft'
-- WHERE address_name = 'mango markets v4'
)
-- transactions AS (
SELECT
date_trunc('day', t.block_timestamp) as date,
address_name,
avg(UNITS_LIMIT) as avg_UNITS_LIMIT,
avg(UNITS_CONSUMED) as avg_UNITS_CONSUMED,
avg(TX_SIZE) as avg_TX_SIZE ,
avg(FEE) as avg_FEE,
count(labels.tx_id) tx_count
FROM
solana.core.fact_transactions t
JOIN labels
ON t.tx_id = labels.tx_id
Run a query to Download Data