表table1:
a b
1 q
2 v
3 n
4 b
2 b
------------------
我想查询a字段的count数,和b= 'b '的count数.
高手sql怎么写呢
------解决方案--------------------------------------------------------
SELECT TA.aALL,TB.bALL FROM (SELECT COUNT(A) AS aALL FROM TABLE1) TA,
(SELECT COUNT(B) AS bALL FROM TABLE1 WHERE b= 'b ') TB