MySQL JOIN with where clause and group by count
问题 I run a the following query, SELECT status.status_id, status.status_name, COUNT(workbin.status_id) FROM `status` LEFT JOIN `workbin` ON workbin.status_id = status.status_id GROUP BY status.status_id and got the output status_id status_name count 1 New 44 2 On Hold 1 3 In Analysis 2 4 In Development 12 5 In Testing 17 6 In Release 2 7 Completed 151 8 In Review 0 9 Unit Testing 0 11 Rework 0 12 Reopen 0 Now i need to add a where clause in this query, to retrive the data based on the user id in