CoinConverseOptimistic Bears STPM each chain bar chart
Updated 2022-11-09
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
›
⌄
WITH op_ as (SELECT --Optimism
'optimism' as chain,
date_trunc('day', block_timestamp) as dt,
count(*) as tx_count,
count(case when status like '%FAIL%' then 1 else null end) as fail_tx_count
FROM optimism.core.fact_transactions
WHERE block_timestamp::date >= '2022-10-01' and block_timestamp::date <= '2022-11-08'
GROUP BY dt
)
, e_ as ( -- ethereum
SELECT
'ethereum' as chain
, date_trunc('day', block_timestamp) as dt
, count(*) as tx_count
, count(CASE WHEN status <> 'SUCCESS' THEN 1 END) as fail_tx_count
FROM ethereum.core.fact_transactions
WHERE block_timestamp::date >= '2022-10-01' and block_timestamp::date <= '2022-11-08'
GROUP BY dt
)
, p_ as ( -- success polygon
SELECT
'polygon' as chain
, date_trunc('day', block_timestamp) as dt
, count(*) as tx_count
, count(CASE WHEN status <> 'SUCCESS' THEN 1 END) as fail_tx_count
FROM polygon.core.fact_transactions
WHERE block_timestamp::date >= '2022-10-01' and block_timestamp::date <= '2022-11-08'
GROUP BY dt
)
, f_ as ( -- success flow
SELECT
'flow' as chain
, date_trunc('day', block_timestamp) as dt
, count(*) as tx_count
, count(CASE WHEN tx_succeeded <> 'TRUE' THEN 1 END) as fail_tx_count
Run a query to Download Data