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
2021-08-24 13:12:16
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