xxxxxxxxxx
SELECT c.id, c.first_name, c.last_name, c.gender, c.age, c.customer_since,
s.date AS sale, p.date AS promotion
FROM customers c
LEFT JOIN sales s
ON c.id = s.customer_id
LEFT JOIN promotions p
ON c.id = p.customer_id;
xxxxxxxxxx
select a.ip, a.os, a.hostname, a.port, a.protocol,
b.state
from a
left join b on a.ip = b.ip
and a.port = b.port