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

13 lines
292 B
SQL

SELECT
s.street,
s.city,
s.postcode,
s.id,
s.name AS supplierName,
p.name AS province,
co.name country
FROM supplier s
JOIN province p ON s.provinceFk = p.id
JOIN country co ON s.countryFk = co.id
WHERE s.id = ?