I have a simple employer model with basic info and group (group id as a foreign key).
first_name = ..
last_name = ..
designation = model.ForeignKey(Designation)
using MySql i can use group_by query like this
SELECT group, COUNT(group) AS gcount
FROM employer GROUP BY group
How can i achieve it via django ORM or can say how to group by using django ??
Looking for something like