i dont exactly know how write down this query,
so im asking your guys and gals help.
so, i have a table the contains something like:
COLUMNS
id,keyword,pages
what i basicly need is to get all the rows where pages!=count(keyword)
this is basicly how i tried to do it anyway.
so it should be really simple, return all rows, where the keyword count does not equal the pages column value.
so, if for example the data is like this :
ROW A: 1, aaa, 3
ROW B: 4, aaa, 3
ROW C: 5, aaa, 3
ROW D: 5, aac, 100
with an example as above,
only ROW D will be returned since rows a,b,c PAGES (3) match the keyword count.
any help will welcome.
thx!
A solution without a subquery. This will work filne in Mysql, but for more strict SQL’s you need to add some aggregate functios.
Also use indexes like these: