Query editor
-- project countWITH CTE AS (SELECTproject,count(1) as txn_cnt,ROUND(SUM(amount_usd)) as total_amount_usd,ROUND(SUM(amount_usd)/count(1)) AS avg_txn_amount_usd,SUM(count(1)) OVER () AS table_txn_cnt,SUM(SUM(amount_usd)) OVER () AS table_amount_usdFROM dex.tradesgroup by 1)SELECTproject,txn_cnt,total_amount_usd,avg_txn_amount_usd,ROUND(txn_cnt*100.0/table_txn_cnt, 2) as txn_share,ROUND(total_amount_usd*100.0/table_amount_usd, 2) as amount_usd_shareFROM CTEorder by txn_cnt desc