MYSQL and WHERE clause returning more records...

Status
Not open for further replies.

tob

New member
Jan 7, 2007
428
2
0
Hi all,

I'm working with mysql again and hit another wall, when I add the WHERE clause to this statement, it should RESTRICT the results instead of expand them.. but I end of getting more results back.. wtf

Code:
SELECT tobyn_stats.Keyword, count(tobyn_stats.keyword), sum(tobyn_stats.Converted), sum(tobyn_stats.Clicked), (sum(tobyn_stats.Converted) / sum(tobyn_stats.Clicked)) as crt, (sum(tobyn_stats.Clicked) / count(tobyn_stats.keyword)) as ctr, tobyn_deactivations.de_deactivated, tobyn_stats.source FROM tobyn_stats LEFT JOIN tobyn_deactivations ON tobyn_stats.Keyword = tobyn_deactivations.de_keyword WHERE Source = 'LS' GROUP BY tobyn_stats.Keyword ORDER BY count(keyword) ASC

Any ideaers? Thanks.

Tob
 


And.. I figured it out :) I needed to use multiple fields for my group by and ON clauses, thanks anyway.

Tob
 
Status
Not open for further replies.