Hello,
the following query
select , count(videowords.wordid) from videowords group by videowords.wordid having count() < 2
VIDEOS_VIDEOID SEQUENCE WORDID count(videowords.wordid)
4 | 4 | 8 | 1
5 | 4 | 9 | 1
142 | 3 | 456 | 1
142 | 4 | 457 | 1
So far so good. It's listing only the records where the wordid appears less than twice.
I would like to narrow the selection down further to exclude those records where VIDEOS_VIDEOID = 142.
I tried the following:
select count(videowords.wordid) from videowords group by videowords.wordid having count() < 2 AND videowords.videos_videoid <> '142'
but I get the following error:
#1054 - Unknown column 'videowords.videos_videoid' in 'having clause'
Any ideas how I can achieve this?
Thanks,
Tim.