Invalid query:

select trainingdate, topic, message, id from news where target='tapahtuma' and trainingdate is not null and trainingdate>=20170227 and status = 'visible' order by trainingdate limit 8