Jag skulle skriva frågan så här:
SELECT o.name AS offer, COUNT(c.id) AS clicks,
SUM( IF(c.conversionDate IS NOT NULL, o.commission, NULL) ) AS revenue
FROM offers o JOIN clicks c ON (c.offerID=o.ID)
GROUP BY o.ID;
Här är en annan lösning, men erbjudanden som inte har några konverterade klick visas inte i frågeresultatet:
SELECT o.name AS offer, COUNT(c.id) AS clicks,
SUM(o.commission) AS revenue
FROM offers o JOIN clicks c
ON (c.offerID=o.ID AND c.conversionDate IS NOT NULL)
GROUP BY o.ID;