SELECT
COUNT( 0 ) totalNum,
SUM( CASE WHEN `user_id` IS NULL THEN 1 ELSE 0 END ) planNum,
SUM( CASE WHEN `user_id` IS NOT NULL THEN 1 ELSE 0 END ) myPlanNum
FROM
business_plan_selection
SELECT
COUNT( 0 ) totalNum,
SUM( CASE WHEN `user_id` IS NULL THEN 1 ELSE 0 END ) planNum,
SUM( CASE WHEN `user_id` IS NOT NULL THEN 1 ELSE 0 END ) myPlanNum
FROM
business_plan_selection