sepehrmhz82023-05-13 12:37 PM
Updated 2023-05-14
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
'FLOW' as Network,
date_trunc(week, block_timestamp) as date,
count(distinct tx_id) as Txs,
count(distinct proposer) as Users,
count (case when tx_succeeded != 'TRUE' then 1 end) as Failed_Txs,
count (case when tx_succeeded = 'TRUE' then 1 end) as Success_Txs,
(Success_Txs / (Success_Txs+ Failed_Txs)) * 100 as Success_Rate
from
flow.core.fact_transactions
where
block_timestamp >= '2023-01-01'
group by
1,
2
union ALL
select
'BSC' as Network,
date_trunc(week, block_timestamp) as date,
count(distinct tx_hash) as Txs,
count(distinct from_address) as Users,
count (case when status != 'SUCCESS' then 1 end) as Failed_Txs,
count (case when status = 'SUCCESS' then 1 end) as Success_Txs,
(Success_Txs / (Success_Txs+ Failed_Txs)) * 100 as Success_Rate
from
bsc.core.fact_transactions
where
block_timestamp >= '2023-01-01'
group by
1,
2
union ALL
select
'Near' as Network,
date_trunc(week, block_timestamp) as date,
count(distinct tx_hash) as Txs,
Run a query to Download Data