D3 TeamTrading - Daily Trades - NDuv311
Updated 2025-01-17
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 tb1 as (
-- select
-- block_timestamp,
-- fact_transfers_id trans,
-- from_address user
-- from thorchain.core.fact_transfers
-- )
-- select
-- trunc(block_timestamp,'day') as "day",
-- count(distinct(trans)) as "Trades",
-- count(distinct(user)) as Users,
-- "Trades"/Users as "Avg per User"
-- from tb1
-- where block_timestamp::date >= current_date - 30
-- group by 1
with tb1 as (
select
block_timestamp,
fact_swaps_id trans,
from_address user
from thorchain.defi.fact_swaps
)
select
trunc(block_timestamp,'day') as "day",
count(distinct(trans)) as "Trades",
count(distinct(user)) as "Users",
"Trades"/"Users" as "Avg per User"
from tb1
group by 1
QueryRunArchived: QueryRun has been archived