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

13 lines
280 B
SQL

SELECT
c.street,
c.socialName,
c.city,
c.postcode,
c.id,
c.name AS clientName,
p.name AS province,
co.name country
FROM client c
JOIN province p ON c.provinceFk = p.id
JOIN country co ON c.countryFk = co.id
WHERE c.id = ?