Report query

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
sgaucho
Posts: 5
Joined: 26 Nov 2010, 21:58

Report query

Post by sgaucho »

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
Lapinkiller
Posts: 408
Joined: 28 Jan 2011, 18:47
Location: France
Contact:

Re: Report query

Post by Lapinkiller »

Hello

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
i hope it will help you.
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
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Report query

Post by cas »

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
Post Reply