Updated 2022-11-19
    with osmosis_priceTb as (
    select
    date_trunc('day',recorded_at) as p_date,
    symbol,
    avg(price) as price_usd
    from osmosis.core.dim_prices
    WHERE p_date > '2022-11-01'
    group by 1,2
    )
    , priceTb as (
    SELECT
    hour::date as p_date,
    symbol,
    avg(price) as price_usd
    FROM ethereum.core.fact_hourly_token_prices
    WHERE p_date > '2022-11-01'
    GROUP by 1,2
    )
    , ftxtable as (
    select *
    from ethereum.core.dim_labels
    where label ilike '%ftx%' or address_name ilike '%ftx%'
    ),
    FTX_to_Eth as (
    select
    block_timestamp,
    ORIGIN_FROM_ADDRESS,
    to_address,
    TX_HASH,
    symbol as Symbol_Out,
    amount_usd
    from ethereum.core.ez_token_transfers
    where from_address in (select distinct address from ftxtable)
    and to_address not in (select distinct address from ftxtable)
    and block_timestamp::date BETWEEN '2022-11-05' and '2022-11-18'
    -- group by 1,2,3
    Run a query to Download Data