Query editor
with price as (select date_trunc('day', block_time) as day, 'OUSG' as token,avg(cast(bytearray_to_uint256(bytearray_substring(data, 33,32)) as double)/1e18) as pricefrom ethereum.logswhere contract_address = 0xc53e6824480d976180A65415c19A6931D17265BAand topic0 = 0x1ad78d5a9c05e5f0ee9ff6e3817cc97a99b504483f99ebc08d431bd5c707c741and block_time >= date('2020-01-01')and date(block_time) <> date('2023-03-30')group by 1,2union allselect date_trunc('day', evt_block_time) as day, 'OUSG' as token, avg(newPrice/1e18) as pricefrom fluxfinance_ethereum.OndoPriceOracleV2_evt_UnderlyingPriceSet -- Shoutout to Steakhousewhere date(evt_block_time) <> date('2020-03-30')and date(evt_block_time) <> date('2023-03-30')group by 1,2union allselect date_trunc('day', date('2020-01-01')) as day, 'STBT' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'BENJI' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'MPLcashUSDC' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'MPLcashUSDT' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'tfBILL' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'USDM' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'RCOIN' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'SKHC' as token, cast(1000 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'HLEOVUS' as token, cast(1000 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'HLEOVWW' as token, cast(1000 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'HLSCOPE' as token, cast(1000 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'ULTRA' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2020-01-01')) as day, 'DE000A30V6H0' as token, cast(106176.8 as double) as priceunion allselect date_trunc('day', date('2024-03-01')) as day, 'BUIDL' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2024-03-01')) as day, 'BUIDL-I' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2023-12-06')) as day, 'USTB' as token, cast(10 as double) as priceunion allselect date_trunc('day', date('2023-12-06')) as day, 'WTGXX' as token, cast(1 as double) as priceunion allselect date_trunc('day', date('2023-12-06')) as day, 'VBILL' as token, cast(1 as double) as priceunion ALLSELECT date_trunc('day', evt_block_time) as period, 'USTB' as symbol, max_by(current, evt_block_time) * 1e-6 as priceFROMchainlink_ethereum.Aggregator_evt_AnswerUpdatedWHERE contract_address = 0xd5BC4e3c7e77A5776fD9D0DDe8471B8B4aEc10f5AND evt_block_number >= 20265109GROUP BY 1,2