rajsAll Daily Correlation
    Updated 2022-06-27
    with algo_price as
    (
    SELECT
    date_trunc('day', block_hour) as date,
    avg(price_usd) as algo_price
    from flipside_prod_db.algorand.prices_swap
    where asset_id = '0'
    group by 1
    )
    ,

    eth_price AS
    (
    SELECT
    date_trunc('day', hour) as date,
    avg(price) as eth_price
    from ethereum.core.fact_hourly_token_prices
    where token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1
    )
    ,

    btc_price as
    (
    SELECT
    date_trunc('day', hour) as date,
    avg(price) as btc_price
    from ethereum.core.fact_hourly_token_prices
    where token_address = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'
    group by 1
    )
    ,

    algo_txs as
    (
    SELECT
    Run a query to Download Data