mlhUntitled Query
Updated 2022-11-01
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
sELECT block_timestamp::date as days,
l.project_name as token,
count (distinct tx_id) as TX_Count,
row_number() over (partition by days order by TX_Count desc) as rank_index
FROM osmosis.core.fact_swaps swaps
LEFT JOIN osmosis.core.dim_labels l
ON swaps.from_currency = l.address
JOIN osmosis.core.dim_prices px
ON date_trunc('hour', swaps.block_timestamp) = date_trunc('hour', px.recorded_at) AND px.symbol = l.project_name
WHERE tx_status = 'SUCCEEDED' AND chain_id = 'osmosis-1'
and block_timestamp>='2022-10-20'
and block_timestamp<='2022-10-31'
GROUP BY 1,2
having TX_Count is not null
qualify rank_index <= 10
ORDER BY 4
Run a query to Download Data