adriaparcerisasaxelar recap 6
Updated 2022-12-01
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
t1 as (
SELECT
distinct trader
from osmosis.core.fact_swaps
where to_currency='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
and block_timestamp>=CURRENT_DATE-INTERVAL '1 MONTH'
),
t2 as (
select
--trunc(block_timestamp,'day') as date,
count(distinct LIQUIDITY_PROVIDER_ADDRESS) as users,
sum(amount/pow(10,decimal)) as volume
from osmosis.core.fact_liquidity_provider_actions
where currency='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E' and action='pool_joined'
and block_timestamp>=CURRENT_DATE-INTERVAL '1 MONTH'
and LIQUIDITY_PROVIDER_ADDRESS in (select trader from t1)
--group by 1
),
t3 as (
select
--trunc(block_timestamp,'day') as date,
count(distinct DELEGATOR_ADDRESS) as users,
sum(amount/pow(10,decimal)) as volume
from osmosis.core.fact_staking
where currency='ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E' and action='delegate'
and block_timestamp>=CURRENT_DATE-INTERVAL '1 MONTH'
and DELEGATOR_ADDRESS in (select trader from t1)
--group by 1
),
t4 as (
select
--trunc(block_timestamp,'day') as date,
count(distinct trader) as users,
sum(from_amount/pow(10,from_decimal)) as volume
from osmosis.core.fact_swaps
Run a query to Download Data