I have a "work" table with the following fields:
I would like to display for each DISTINCT "work_pop_id" the number of records in the table.
Thank you
select count(work_id)
from work
group by work_pop_id
Try this:
select work_pop_id, count(work_id) as work_prop_count
from `work`
group by work_pop_id
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.