Is it possible to make query like this? That has some error...
Query should check if user did answer question with q.id
.
SELECT pictureid,
id,
points
FROM questions q
WHERE IF (q.id NOT IN (SELECT questions_id
FROM history h
WHERE h.users_id = 3))