Diako999Aurora_block_stats
Updated 2023-02-27
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
transactions as (
select
date_trunc('day', block_timestamp) as date,
count(distinct (tx_hash)) as transactions,
tx_hash
from
near.core.fact_transactions
where
block_timestamp >= '2023-02-5'
group by
date,
tx_hash
order by
date desc
),
transfers as (
select
date_trunc('day', b.block_timestamp) as date,
b.tx_hash as transaction
from
near.core.fact_transfers b
join transactions on b.tx_hash = transactions.tx_hash
),
swaps as (
select
date_trunc('day', c.block_timestamp) as swaped_date,
c.tx_hash as tx_swap,
c.block_id as block
from
transfers
join near.core.ez_dex_swaps c on transfers.transaction = c.tx_hash
where
c.token_in = 'AURORA'
or c.token_out = 'AURORA'
group by