What I would like to do is produce a query which returns the differ开发者_运维技巧ence between the sum of two other queries. I have tried, but I have failed. Here is what I tried:
Select ((SELECT COUNT(*) as B FROM Business) - (SELECT COUNT(*) as S FROM Shusiness)) as BusMinusShus
Yep, just put in a * in the count:
Select ((SELECT COUNT(*) FROM Business) - (SELECT COUNT(*) FROM Shusiness)) as BusMinusShus
精彩评论