Mysql count with conditions

A simple tip on mysql query for multiple counts with conditions.
SELECT COUNT( * ) AS totalUsers, SUM( xu.state = “QLD” ) AS queenslandUsers FROM xxx_users AS xu
Latest posts by Kapil Dev (see all)
- Travelling Salesman Problem using Branch and Bound Approach in PHP - July 5, 2016
- Javascript: Print content of particular div - March 4, 2015
- Group by with Order Desc in MySQL - June 3, 2014