At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!
SELECT bill_number, ( SELECT fit.trip_number FROM ( SELECT o.changed, it.trip_number FROM itriptlo it INNER JOIN odrstat o ON it.detail_line_id = o.order_id AND it.trip_number = o.trip_number AND o.status_code = 'ASSGN' WHERE it.detail_line_id = tlo.detail_line_id ORDER BY changed ASC FETCH FIRST 2 ROWS ONLY ) as FIT ORDER BY changed DESC FETCH FIRST ROW ONLY ) as FirstIntermediateTrip FROM tlorder tlo WHERE Date(pick_up_by) BETWEEN '2009-03-01' AND '2009-03-01' WITH UR
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.