I need to pull the count of the "Skill" column for each unique "FileID."
For example, my table looks like:
So I would like the output in this scenario to be:
400100 - 4
400200 - 3
400300 - 3
I am still relatively new to SQL so hopefully what I am asking is clear.
Thank you!
use group by and aggregate function
select fieldid, count(skill)
from tablename
group by fieldid
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.