MLDZMNdistribution by sale price
    Updated 2022-11-30
    with tb1 as (select
    hour::date as day,
    avg(price) as price_token
    from ethereum.core.fact_hourly_token_prices where SYMBOL = 'WETH'
    group by 1),
    tb2 AS (
    select
    BLOCK_TIMESTAMP::date as day,
    (sum(SWAP_TO_AMOUNT)/sum(SWAP_FROM_AMOUNT)) as price_token
    from solana.core.fact_swaps
    where SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'
    and SWAP_TO_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    group by 1),

    tb3 as (select
    BLOCK_HOUR::date as day,
    avg(PRICE_USD) as price_token
    from algorand.defi.ez_price_pool_balances
    where ASSET_ID=0
    group by 1),

    tb4 as (select
    date_trunc('day',TIMESTAMP) as day,
    TOKEN_CONTRACT,
    Symbol,
    avg(price_usd) as price_token
    from flow.core.fact_prices
    group by 1,2,3
    ),
    tb5 as (
    SELECT
    trunc(timestamp,'day') as day,
    avg(price_usd) as price_token
    from near.core.fact_prices where symbol='wNEAR'
    group by 1
    Run a query to Download Data