headitmanagerStablecoin Dominance : Volume over time
Updated 2022-06-26
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
32
33
34
35
36
›
⌄
with addressess as (select address,project_name from osmosis.core.dim_labels where
project_name in('axlUSDC','USDC.grv','USDT','axlDAI','DAI.grv'))
, volume_from as (select sum(from_amount/pow(10,from_decimal)) as famount,
case
when project_name in('axlDAI','DAI.grv') then 'DAI'
when project_name in('axlUSDC','USDC.grv') then 'USDC'
else 'USDT' end stablecoin
from osmosis.core.fact_swaps inner join addressess
on addressess.address=osmosis.core.fact_swaps.from_currency
group by stablecoin)
, volume_to as (select sum(to_amount/pow(10,to_decimal)) as tamount,
case
when project_name in('axlDAI','DAI.grv') then 'DAI'
when project_name in('axlUSDC','USDC.grv') then 'USDC'
else 'USDT' end stablecoin
from osmosis.core.fact_swaps inner join addressess
on addressess.address=osmosis.core.fact_swaps.to_currency
group by stablecoin)
, volume_from_overtime as (select sum(from_amount/pow(10,from_decimal)) as famount,
case
when project_name in('axlDAI','DAI.grv') then 'DAI'
when project_name in('axlUSDC','USDC.grv') then 'USDC'
else 'USDT' end stablecoin , block_timestamp::date as d
from osmosis.core.fact_swaps inner join addressess
on addressess.address=osmosis.core.fact_swaps.from_currency
group by stablecoin,d)
, volume_to_overtime as (select sum(to_amount/pow(10,to_decimal)) as tamount,
case
when project_name in('axlDAI','DAI.grv') then 'DAI'
when project_name in('axlUSDC','USDC.grv') then 'USDC'
else 'USDT' end stablecoin, block_timestamp::date as d
from osmosis.core.fact_swaps inner join addressess
on addressess.address=osmosis.core.fact_swaps.to_currency
group by stablecoin,d)
Run a query to Download Data