I have two tables: posts and questions.
My SQL query I use:
select DISTINCT question_id from posts WHERE user_id = 29 returns 4 id's:
NULL and 0 do not exist in 'question_id' field in questions table.
I want to return only those question_id's that exist the questions table:
How do I use a join to return the distinct value in posts table that must exist in questions table?