Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.
SELECT COUNT(o.orders_id) AS ordercount, (DATEDIFF(DAY, o.date_purchased, osh.orders_status_history_timestamp)) AS timetaken FROM orders O, dbo.tblPS_orders_status_history OSH WHERE o.orders_status = 4 AND o.paymentMethodID = 1 AND o.orders_statusID = OSH.orders_status_history_id AND DATEDIFF(DAY, o.date_purchased, GETDATE()) < 31 GROUP BY timetaken ORDER BY timetaken
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.