hbd1994Test 04
    Updated 2023-10-28
    with USDC_prices as (
    select
    hour,
    case
    when symbol = 'USDC' then 'aBasUSDbC'
    end as symbol,
    price
    from ethereum.price.ez_hourly_token_prices
    where symbol in ('USDC')
    and hour >= '2023-08-22'),

    weth_current as (SELECT
    resp:data:weth:usd as weth_current_price
    from (SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/simple/price?ids=weth&vs_currencies=usd&precision=18') as resp)),

    usdc_current as (SELECT
    resp:data:"bridged-usd-coin-base":usd as usdbc_current_price
    from (SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/simple/price?ids=bridged-usd-coin-base&vs_currencies=usd&precision=18') as resp)),

    cbeth_current as (SELECT
    resp:data:"coinbase-wrapped-staked-eth":usd as cbeth_current_price
    from (SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/simple/price?ids=coinbase-wrapped-staked-eth&vs_currencies=usd&precision=18') as resp)),

    WETH_prices as (
    select
    hour,
    case
    when symbol = 'WETH' then 'aBasWETH'
    end as symbol,
    price
    from ethereum.price.ez_hourly_token_prices
    where symbol in ('WETH')
    and hour >= '2023-08-22'),
    Run a query to Download Data