Baselight
SELECT   
  symbols.symbol,
  COALESCE(SUM(CAST(@portals.transactions.deposits.amountusd AS DOUBLE)),0) AS total_deposit_volume,
  COALESCE(SUM(CAST(@portals.transactions.swaps.inputamount AS DOUBLE)),0) AS total_swap_volume,
  COALESCE(SUM(CAST(@portals.transactions.withdraws.amountusd AS DOUBLE)),0) AS total_withdrawal_volume
FROM (SELECT symbol FROM @portals.transactions.deposits 
      UNION 
      SELECT inputtoken FROM @portals.transactions.swaps 
      UNION
      SELECT symbol FROM @portals.transactions.withdraws
     ) symbols
LEFT JOIN @portals.transactions.deposits ON symbols.symbol=@portals.transactions.deposits.symbol
LEFT JOIN @portals.transactions.swaps ON symbols.symbol=@portals.transactions.swaps.inputtoken
LEFT JOIN @portals.transactions.withdraws ON symbols.symbol=@portals.transactions.withdraws.symbol
GROUP BY symbols.symbol
ORDER BY total_deposit_volume DESC
LIMIT 10
symboltotal_deposit_volumetotal_swap_volumetotal_withdrawal_volume
sUSDe3436253453710.53305095454194453.208
WSTETH571908325235.39360598114857010.3977
fUSDC205756706893.979920182872725426.51318
rlArbUSDC3560133362.608390304809869406.305617
srarcV2WETH1176071169.768009403214976281.3665795
WBTC1140957203.57313130886039552.2452407
USDC1034998351.74114920999469913.1408647
WETH288590732.691900250992189793.9715114
PENDLE-LPT266438160.016957702706122262.909655
DAI139316440.3054552401166688786.162501

Share link

Anyone who has the link will be able to view this.