Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.
SELECT category cat1, cat cat2, COUNT(*) quantity, COUNT(CASE WHEN TYPE = 'P' THEN 1 END) type_p, COUNT(CASE WHEN TYPE = 'T' THEN 1 END) type_t FROM yourtable GROUP BY category, cat ORDER BY cat1, cat2 DESC;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.