i am trying to calculate status from one table and total status count but it is display in same column the query is
select Status ,count(Status) from assigntask group by status union all
SELECT count(Status) , count(Status) as total from assigntask ;
Status Count Total
Complete 1 3
You have to provide a dummy field in both selects for the union to match up.
SELECT Status, COUNT(Status) as count, NULL as total FROM assigntask GROUP BY status UNION ALL SELECT NULL, COUNT(Status), COUNT(Status) FROM assigntask;