sarathgalgo 1
Updated 2022-04-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
›
⌄
WITH swap_to AS (SELECT date(block_timestamp) as date1, COUNT(tx_group_id) as swap_to_count, sum(swap_to_amount) as swap_to_volume
FROM algorand.swaps
WHERE swap_to_asset_id = '694432641'
GROUP BY date1
ORDER BY date1),
swap_from AS (SELECT date(block_timestamp) as date2, COUNT(tx_group_id) as swap_from_count, sum(swap_to_amount) as swap_from_volume
FROM algorand.swaps
WHERE swap_from_asset_id = '694432641'
GROUP BY date2
ORDER BY date2)
SELECT date1 as date, swap_from_count, swap_from_volume, swap_to_count, swap_to_volume
FROM swap_to JOIN swap_from ON date1 = date2
Run a query to Download Data