Jump to content

Help with complex query


bubbadawg

Recommended Posts

I have a projects_tbl setup with the following fields: project_id, project, hours, and date. I am trying to run a query that will return each (unique) project, total hours for the entire project and number of days the project took to complete (difference between first date entry and last date entry).

 

I am able to come up with part of the query:

 

"SELECT project, SUM(hours) AS hours from projects_tbl GROUP BY project."

 

However, I am thinking that the remaining part might be above my pay grade as I am not a MySQL expert. Any help is greatly appreciated. 

Link to comment
https://forums.phpfreaks.com/topic/146568-help-with-complex-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.