你參考~https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=517b4280b6b5caa0eaaf7d5...
恩... SELECT 客戶名稱, SUM(數量單價) AS 交易金額, 信用度比率 = SUM(數量單價) / (SELECT top 1 信用額度 FROM...
http://www.blueshop.com.tw/board/FUM20041006152735ZFS/BRD20120528144511DBA.html...