SG data2024-06-03 11:33 AM
Updated 2024-06-20
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
›
⌄
WITH eth AS (
SELECT
date_trunc('month', t.block_timestamp) AS block_date,
COUNT(DISTINCT t.to_address) AS eth_monthly_active_contract
FROM ethereum.core.fact_transactions t
INNER JOIN ethereum.core.dim_contracts c ON t.to_address = c.address
WHERE t.block_timestamp > '2021-12-31'
GROUP BY block_date
),
poly AS (
SELECT
date_trunc('month', t.block_timestamp) AS block_date,
COUNT(DISTINCT t.to_address) AS poly_monthly_active_contract
FROM polygon.core.fact_transactions t
INNER JOIN polygon.core.dim_contracts c ON t.to_address = c.address
WHERE t.block_timestamp > '2021-12-31'
GROUP BY block_date
),
arbitrum AS (
SELECT
date_trunc('month', t.block_timestamp) AS block_date,
COUNT(DISTINCT t.to_address) AS arbitrum_monthly_active_contract
FROM arbitrum.core.fact_transactions t
INNER JOIN arbitrum.core.dim_contracts c ON t.to_address = c.address
WHERE t.block_timestamp > '2021-12-31'
GROUP BY block_date
),
base AS (
SELECT
date_trunc('month', t.block_timestamp) AS block_date,
COUNT(DISTINCT t.to_address) AS base_monthly_active_contract
FROM base.core.fact_transactions t
INNER JOIN base.core.dim_contracts c ON t.to_address = c.address
WHERE t.block_timestamp > '2021-12-31'
GROUP BY block_date
),
QueryRunArchived: QueryRun has been archived