Query editor
SELECTdate, address, pair_name, x.contract_address, lp_share, reserve0_amount, reserve1_amount, ((reserve0_amount * a.price) + (reserve1_amount * b.price)) tvl_usdFROM(((SELECTdate, address, pair_name, contract_address, lp_share, token0, (lp_share * reserve0) reserve0_amount, token1, (lp_share * reserve1) reserve1_amountFROM(query_3897743)LEFT JOIN query_3897746 USING (contract_address, date))) xLEFT JOIN prices.usd_daily a ON ((token0 = a.contract_address) AND (date = a.day) and a.blockchain = 'base')LEFT JOIN prices.usd_daily b ON ((token1 = b.contract_address) AND (date = b.day) and b.blockchain = 'base'))ORDER BY 1 DESC, 8 DESC