select count(*) as num from ( select r.task_id map_task_ref r left join map_task t on r.task_id=t.task_id where r.create_id=1571 union all select r.task_id map_task_ref r right join map_task t on r.task_id=t.task_id where r.create_id=1571 and t.status=0)
可以这么写sql么