Query editor
WITH combined AS (SELECT 'DTrade' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_d_trade_data_for_last_6_monthsUNION ALLSELECT 'tontrade' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_tontrade_data_for_last_6_monthsUNION ALLSELECT 'blum' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_blum_data_for_last_6_monthsUNION ALLSELECT 'sky' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_sky_data_for_last_6_monthsUNION ALLSELECT 'grim' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_grim_data_for_last_6_monthsUNION ALLSELECT 'pocketfi' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_pocket_fi_data_for_last_6_monthsUNION ALLSELECT 'stonks' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_stonks_data_for_last_6_monthsUNION ALLSELECT 'maestro' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_maestro_data_for_last_6_monthsUNION ALLSELECT 'x1000' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_x_1000_data_for_last_6_monthsUNION ALLSELECT 'swapi' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_swapi_data_for_last_6_monthsUNION ALLSELECT 'gbot' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_groyp_data_for_last_6_monthsUNION ALLSELECT 'redo' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_redo_data_for_last_6_monthsUNION ALLSELECT 'not.trade' AS bot_name, date, volume_ton, fee_ton, daily_transactions, daily_unique_traders FROM dune.xrocket_tg.result_not_trade_data_for_last_6_months)SELECT sum(volume_ton) as total_volume_ton, sum(fee_ton) as total_fee_ton, bot_nameFROM combinedWHERE date >= CURRENT_DATE - INTERVAL '1' monthAND date < CURRENT_DATEgroup by bot_nameORDER BY bot_name;