Query editor
with mux_data as(select (CAST(json_query(args,'lax $.amount') AS DECIMAL)/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL)/1e18) as volume,CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,evt_block_time,'Trading - Arbitrum' as "Type"from mux_arbitrum.LiquidityPoolHop1_evt_ClosePositionUNION ALLselect (CAST(json_query(args,'lax $.amount') AS DECIMAL(38, 0))/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL(38, 0))/1e18),CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,evt_block_time,'Trading - Arbitrum' as "Type"from mux_arbitrum.LiquidityPoolHop1_evt_OpenPositionUNION ALLselect (CAST(json_query(args,'lax $.amount') AS DECIMAL(38, 0))/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL(38, 0))/1e18),CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,evt_block_time,'Trading - Arbitrum' as "Type"from mux_arbitrum.LiquidityPoolHop1_evt_LiquidateUNION ALLselect (CAST(json_query(args,'lax $.amount') AS DECIMAL)/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL)/1e18) as volume,CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,evt_block_time,'Trading - Avalanche' as "Type"from mux_avalanche_c.LiquidityPoolHop1_evt_ClosePositionUNION ALLselect (CAST(json_query(args,'lax $.amount') AS DECIMAL(38, 0))/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL(38, 0))/1e18),CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,evt_block_time,'Trading - Avalanche' as "Type"from mux_avalanche_c.LiquidityPoolHop1_evt_OpenPositionUNION ALLselect (CAST(json_query(args,'lax $.amount') AS DECIMAL(38, 0))/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL(38, 0))/1e18),CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,evt_block_time,'Trading - Avalanche' as "Type"from mux_avalanche_c.LiquidityPoolHop1_evt_LiquidateUNION ALLselect (CAST(json_query(args,'lax $.amount') AS DECIMAL(38, 0))/1e18 *CAST(json_query(args,'lax $.assetPrice') AS DECIMAL(38, 0))/1e18),CAST(json_query(args,'lax $.feeUsd') AS DECIMAL)/1e18 as fee,