barsik_tezikStarknet tx count by sectors
Updated 2023-11-25
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 accs as (
SELECT
DISTINCT CONCAT('0x', LTRIM(CONTRACT, '0x')) as addr,
CONTRACT as addr0
from
external.tokenflow_starknet.decoded_traces
where
CHAIN_ID = 'mainnet'
and FUNCTION = 'constructor'
),
tb1 as (
SELECT
DISTINCT CONTRACT,
count(DISTINCT tx_hash) as txs
from
external.tokenflow_starknet.decoded_transactions
where
CHAIN_ID = 'mainnet'
and CONTRACT in (
SELECT
DISTINCT addr0
from
accs
)
group by
1
)
select
case
when txs < 10 then 'A'
when txs >= 10
and txs < 20 then 'B'
when txs >= 20
and txs < 50 then 'C'
when txs >= 50
and txs < 100 then 'D'
Run a query to Download Data