I managed to accomplish this using a script similar to that below:
CREATE TABLE `tmp_div_numprojects`(
`dn_id` INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`dn_id`), KEY(`managing_division`))
SELECT
`managing_division` AS `managing_division`,
COUNT(DISTINCT `project_id`) AS `number_of_projects`
FROM
`report_view`
GROUP BY
`managing_division`
This gives me the following result:
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.