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

13 lines
276 B
MySQL
Raw Normal View History

2020-09-25 12:45:00 +00:00
SELECT
c.street,
c.socialName,
c.city,
c.postcode,
c.id,
c.name AS clientName,
p.name AS province,
co.country
FROM client c
JOIN province p ON c.provinceFk = p.id
JOIN country co ON c.countryFk = co.id
WHERE c.id = ?