salix/print/templates/reports/supplier-campaign-metrics/sql/entries.sql

11 lines
248 B
SQL

SELECT
e.id,
e.reference,
e.supplierFk,
t.shipped
FROM vn.entry e
JOIN vn.travel t ON t.id = e.travelFk
WHERE e.supplierFk = ? AND DATE(t.shipped) BETWEEN ? AND ?
ORDER BY
t.shipped DESC;