How to get count of each column data
SELECT SUM(pm_jan &gt; 0) count_pm_jan, 
       SUM(actual_jan &gt; 0) count_actual_jan, 
       SUM(pm_feb &gt; 0) count_pm_feb, 
       SUM(actual_feb &gt; 0) count_actual_feb
FROM pm