I am querying a bug database to find out the no. of bugs marked as resolved within select p.reportername, sum(if(datediff(curdate(),ba.bug_when) sum(if(datediff(curdate(),ba.bug_when)> 7 ) as 'More than 7 days', count(*) as Total from bugs b, bugs_activity ba, profiles p where b.reporter=p...