0xBlackfishOrca Swaps + LP
    Updated 2023-11-05
    with
    hourly_prices as (
    -- hourly prices
    select
    token_address
    , date_trunc('hour', recorded_hour) as hour
    , avg(close) as hourly_price
    from solana.price.ez_token_prices_hourly p
    where
    date(recorded_hour) between date('2022-11-01') and date('2023-10-31')
    and is_imputed = FALSE
    group by 1, 2
    ),

    daily_prices as (
    -- daily prices
    select
    token_address
    , date_trunc('day', recorded_hour) as day
    , avg(close) as daily_price
    from solana.price.ez_token_prices_hourly p
    where
    date(recorded_hour) between date('2022-11-01') and date('2023-10-31')
    and is_imputed = FALSE
    group by 1, 2
    ),

    n as (
    -- check the popularity of the mint
    select
    swap_to_mint as mint
    , count(distinct swapper) as n_swappers
    from solana.defi.fact_swaps s
    where
    date(block_timestamp) between date('2022-11-01') and date('2023-10-31')
    and succeeded = TRUE
    Run a query to Download Data