 <p>Try this:</p> <pre><code>SELECT count(MobileNo), count( case when m.Month=1 then m.Month else 0 end ) as Month 1, count( case when m.Month=2 then m.Month else 0 end ) as Month 2, count( case when m.Month=3 then m.Month else 0 end ) as Month 3, . . . count( case when m.Month=12 then m.Month else 0 end ) as Month 12 FROM MonthlySubscriber m GROUP BY m.Month </code></pre>