我的查询如下:
SELECT distinct CBP.Liability
FROM Markets M
INNER JOIN BetTransaction B ON B.MarketId = M.MarketId AND BetSize > 0
OUTER APPLY
(
SELECT ISNULL (min(Liable),0) AS Liability FROM ClientBetPosition WHERE MarketId = M.MarketId AND ClientId = 349
) AS [CBP]
WHERE M.MarketId NOT IN (SELECT MarketId FROM Transactions WHERE MarketID IS NOT NULL)
AND B.ClientId = 349
这显示了1列和2行的结果, 我需要将它们添加到一行