Query editor
WITH base_users AS (-- Base users countSELECT COUNT(DISTINCT trader) as base_totalFROM (SELECT trader FROM synfutures_base_v3_base.Gate_evt_DepositUNION DISTINCTSELECT trader FROM synfutures_base_v3_base.Instruments_evt_FillUNION DISTINCTSELECT trader FROM synfutures_base_v3_base.Instruments_evt_AddUNION DISTINCTSELECT trader FROM synfutures_base_v3_base.Instruments_evt_Adjust)),blast_users AS (-- Blast users countSELECT COUNT(DISTINCT trader) as blast_totalFROM (SELECT trader FROM synfutures_blast_v3_blast.Gate_evt_DepositUNION DISTINCTSELECT trader FROM synfutures_blast_v3_blast.Gate_evt_WithdrawUNION DISTINCTSELECT call_tx_from as trader FROM synfutures_blast_v3_blast.Instrument_call_trade WHERE call_success = trueUNION DISTINCTSELECT call_tx_from as trader FROM synfutures_blast_v3_blast.Instrument_call_fill WHERE call_success = trueUNION DISTINCTSELECT call_tx_from as trader FROM synfutures_blast_v3_blast.Instrument_call_place WHERE call_success = trueUNION DISTINCTSELECT call_tx_from as trader FROM synfutures_blast_v3_blast.Instrument_call_remove WHERE call_success = true))SELECTbase_total as base_users,blast_total as blast_users,(base_total + blast_total) as total_usersFROM base_users, blast_users;