sriniDaily transactions based on transaction's type copy
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
›
⌄
-- forked from mhm / Daily transactions based on transaction's type @ https://flipsidecrypto.xyz/mhm/q/LK4W8oaTz7Kh/daily-transactions-based-on-transactions-type
with swaps as (
select
distinct tx_hash, 'Swap' as tx_type, *
from arbitrum.core.fact_event_logs
where contract_address = '0xabbc5f99639c9b6bcb58544ddf04efa6802f4064'
and event_name = 'Swap'
and tx_status= 'SUCCESS'
), trades as (
select
distinct tx_hash, 'Trade' as tx_type, *
from arbitrum.core.fact_event_logs
where origin_to_address = '0x3d6ba331e3d9702c5e8a8d254e5d8a285f223aba'
and tx_status= 'SUCCESS'
), mints as (
select
distinct tx_hash, 'Mint/Stake' as tx_type, *
from arbitrum.core.fact_event_logs
where origin_to_address = '0xa906f338cb21815cbc4bc87ace9e68c87ef8d8f1'
and tx_status= 'SUCCESS'
), all_data as (
select * from swaps
union all
select * from trades
union all
select * from mints
)
select
block_timestamp::date as date,
tx_type,
count(*) as daily_txs,
count(distinct origin_from_address) as daily_users,
sum(tx_fee) as daily_fee,
Run a query to Download Data