--一个语句查询多个结果集
SELECT
paperName
,
COUNT
(1)
AS
总题数
,
sum
(
CASE
WHEN
statu = 1
THEN
1
ELSE
0
END
)
AS
审核题数
FROM
question
GROUP
BY
paperNme
SELECT
paperName
,
COUNT
(1)
AS
总题数
,
sum
(
CASE
WHEN
statu = 1
THEN
1
ELSE
0
END
)
AS
审核题数
FROM
question
GROUP
BY
paperNme