Hello,
I need to generate a date wise specific report where I can show the date in one column and the number of defects for each status for a given project.
Does anybody have a query available to obtain this data? I am analyzing the schema but its not very easy!
Mantis version: 1.1.8
Tx,
sg
Report query
Moderators: Developer, Contributor
-
Lapinkiller
- Posts: 408
- Joined: 28 Jan 2011, 18:47
- Location: France
- Contact:
Re: Report query
Hello
this is a sql query for the 1.2.5 database schema :
i hope it will help you.
this is a sql query for the 1.2.5 database schema :
Code: Select all
SELECT date_submitted,
STATUS , Count( * )
FROM mantis_bug_table
WHERE project_id=1
GROUP BY `status` , `date_submitted`
ORDER BY Count( * ) DESC
Last edited by Lapinkiller on 24 May 2011, 09:34, edited 1 time in total.
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
Re: Report query
would use something like this, to get the date readable:
SELECT DATE_FORMAT(date_submitted, '%D %M %Y') AS submitted,
STATUS , Count( * )
FROM mantis_bug_table
WHERE project_id=1
GROUP BY `status` , `submitted`
ORDER BY Count( * ) DESC
SELECT DATE_FORMAT(date_submitted, '%D %M %Y') AS submitted,
STATUS , Count( * )
FROM mantis_bug_table
WHERE project_id=1
GROUP BY `status` , `submitted`
ORDER BY Count( * ) DESC