keshanOsmosis stablecoins 2
Updated 2022-06-28
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
with coin_addresses as (
select address, project_name from osmosis.core.dim_labels
where label_subtype='token_contract' and lower(project_name) in ('usdc.grv', 'axlusdc', 'usdt', 'frax', 'axldai', 'dai.grv', 'ustc')
)
select block_timestamp::date as date, --f.project_name as from_token,
t.project_name as to_token,
sum(to_amount/pow(10, to_decimal)) as to_amount, count(trader) as to_swappers
from osmosis.core.fact_swaps --left join osmosis.core.dim_labels f on f.address=from_currency
left join osmosis.core.dim_labels t on t.address=to_currency
where to_currency in (select c.address from coin_addresses c) and tx_status='SUCCEEDED'
group by date, to_token
order by date
Run a query to Download Data