danhanUntitled Query
Updated 2022-07-19
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 flow as(
with transactions as (
select
proposer as wallets,
count(distinct tx_id) as "Transaction Numbers"
from flow.core.fact_transactions
where tx_succeeded='TRUE'
and block_timestamp >= CURRENT_DATE - 90
group by 1
)
select
case
when "Transaction Numbers"=1 then 'Only one transaction'
when 2<"Transaction Numbers"<10 then 'More than 1 and Less than 10 transactions'
when 10<"Transaction Numbers"<100 then 'More than 10 and Less than 100 transactions'
when "Transaction Numbers">100 then 'More than 100 transactions'
end as status,
count(distinct wallets) as "Distinct Wallets"
from transactions
where status is not null
group by 1
),
solana as(
with transactions as (select
TX_FROM as wallets,
count(distinct tx_id) as "Transaction Numbers"
from solana.core.fact_transfers
where block_timestamp >= CURRENT_DATE - 90
group by 1
)
select
case
when "Transaction Numbers"=1 then 'Only one transaction'
when 2<"Transaction Numbers"<10 then 'More than 1 and Less than 10 transactions'
when 10<"Transaction Numbers"<100 then 'More than 10 and Less than 100 transactions'
Run a query to Download Data