phirestarter Posted May 30, 2005 Share Posted May 30, 2005 Hi there, I'm trying to run a query on the database, that will return all orders already made, and all the statuses they went trough. I'm trying to calculate an average time that takes for an order to change from one status to another. Thanks in advance for any help, phire Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2005 Share Posted May 30, 2005 Here's one that pulls the info. You'll want the date the change was made, right? calculating the difference between the first and last mention of the order is up to you ;) SELECT orders_id,orders_status_id,date_added FROM `orders_status_history` order by orders_id Depending on your version of mysql, this should at least get you started. What I mean is that the syntax might be slightly different for you but this works on mine. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.