14 lines
483 B
SQL

SELECT s01_timestamp AS induct_timestamp,
s04_timestamp AS confirm_timestamp,
sorter, trackid, scanner,
bcr_imgid AS imgid, s01_barcode AS barcode, scanner_status,
pkg_length/10 AS pkg_length, /* In inches */
carriers AS trays,
assignments, divert_status,
destination_req AS requested_dest,
destination_act AS diverted_dest,
sort_code
FROM package_history
WHERE s04_timestamp BETWEEN :startDate AND :endDate
ORDER BY s04_timestamp DESC
LIMIT 4000;