nitsAssets To Swap To Over Time
Updated 2022-03-22
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
with assets as
(SELECT date(block_timestamp) as day, swap_to_asset_id, swap_program,count(*) as total_calls, sum(total_calls) over (partition by swap_to_asset_id order by day) as cumulative_txs
,sum(swap_to_amount) as total_amt, sum(total_amt) over (partition by swap_to_asset_id order by day) as cumulative_amt
from algorand.swaps
where block_timestamp >= '2022-01-01' and swap_from_amount > '0'
GROUP by 1 ,2 ,3 )
SELECT day, asset_name,total_calls,cumulative_txs
from algorand.asset
inner join assets
on asset_id = swap_to_asset_id
-- limit 100
Run a query to Download Data