Sql 2的值为1

时间:2016-07-15 11:30:08

标签: sql-server

我的查询如下:

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行的结果, 我需要将它们添加到一行

0 个答案:

没有答案