My query here records how many individual clicks, each affiliate sends us per day.
It works great for those affiliates that actually did send us some clicks that day. But how can i display those who didnt send any as a 0?
Thanks
Code:
SELECT cookiefrom, prodTypeID, COUNT(DISTINCT ipaddress) as indivclicks, COUNT(*) AS totalclicks
FROM applytracking
WHERE hitdate >= '20050101'
AND hitdate < '20050623'
AND prodtypeid IN ('loans', 'Credit Cards', 'savings' , 'Current Accounts')
GROUP BY cookiefrom, prodTypeID
ORDER BY cookiefrom
It works great for those affiliates that actually did send us some clicks that day. But how can i display those who didnt send any as a 0?
Thanks