cyphervelodrome tvl
    Updated 2023-04-13
    with prices as
    (
    SELECT
    date,
    avg(case when symbol = 'sETH' then price end) as seth_price,
    avg(case when symbol = 'WETH' then price end) as weth_price,
    avg(case when symbol = 'LINK' then price end) as link_price
    from
    (
    SELECT
    date_trunc('day', hour) as date,
    symbol,
    avg(price) as price
    from ethereum.core.fact_hourly_token_prices
    where symbol ilike 'link'
    and hour > '2022-06-15'
    group by 1,2

    UNION
    SELECT
    date_trunc('day', hour) as date,
    symbol,
    avg(price) as price
    from optimism.core.fact_hourly_token_prices
    -- where symbol ilike '''seth'
    where symbol in ('LINK', 'WETH', 'sETH')
    and hour > '2022-06-15'
    group by 1,2
    )
    group by 1
    -- order by 1
    -- limit 10
    )
    ,

    Run a query to Download Data