KowalskiDeFiDirect Creations
Updated 2022-10-31Copy Reference Fork
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
›
-- SELECT
-- DATE_TRUNC('{{period}}', block_timestamp) AS date,
-- COUNT(DISTINCT TX_HASH) as number_transactions,
-- COUNT(DISTINCT creator) as contract_creator_count_tx,
-- COUNT(DISTINCT from_address) as contract_creator_count_tr,
-- COUNT(DISTINCT to_address) AS contract_creation_number,
-- COUNT(DISTINCT from_address)/COUNT(DISTINCT creator) AS ratio_creator_tr_tx,
-- 'Avalanche' as network
-- FROM avalanche.core.fact_traces as traces
-- INNER JOIN
-- (
-- SELECT
-- tx_hash,
-- from_address as creator
-- FROM avalanche.core.fact_transactions
-- WHERE block_timestamp::date < CURRENT_DATE
-- ) USING (tx_hash)
-- WHERE type IN ('CREATE','CREATE2')
-- AND tx_status = 'SUCCESS'
-- AND block_timestamp::date < CURRENT_DATE
-- GROUP BY date
-- UNION DISTINCT
-- SELECT
-- DATE_TRUNC('{{period}}', block_timestamp) AS date,
-- COUNT(DISTINCT TX_HASH) as number_transactions,
-- COUNT(DISTINCT creator) as contract_creator_count_tx,
-- COUNT(DISTINCT from_address) as contract_creator_count_tr,
-- COUNT(DISTINCT to_address) AS contract_creation_number,
-- COUNT(DISTINCT from_address)/COUNT(DISTINCT creator) AS ratio_creator_tr_tx,
-- 'Optimism' as network
-- FROM optimism.core.fact_traces as traces
-- INNER JOIN
-- (
-- SELECT
Run a query to Download Data