I\'m looking for help using sum() in my SQL query:
SELECT links.id, count(DISTINCT stats.id) as clicks, count(DISTINCT conversions.id) as con
For an explanation of why you were seeing incorrect numbers, read this.
I think that Jerome has a handle on what is causing your error. Bryson's query would work, though having that subquery in the SELECT could be inefficient.