Afonso_DiazTotal
Updated 2024-12-21
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
›
⌄
with
main as (
select
tx_id,
block_timestamp,
from_address as user,
split(pool_name, '-')[0] as pool_name,
lp_action,
nvl(rune_amount_usd, asset_amount_usd) as amount_usd
from
thorchain.defi.fact_liquidity_actions
where
split(pool_name, '-')[0] like 'BSC%'
and block_timestamp between '{{ start_date }}' and '{{ end_date }}'
)
select
lp_action,
count(distinct tx_id) as transactions,
count(distinct user) as users,
sum(amount_usd) as volume_usd,
avg(amount_usd) as average_amount_usd
from
main
group by 1
order by 1
QueryRunArchived: QueryRun has been archived