Hi,
An alternative for any MySQL version (from 3.23.??) would be:
SELECT r1.question_id,count(r1.member_id)
FROM Records r1
LEFT JOIN Records r2 ON r1.question_id=r2.question_id
AND r2.member_id=
WHERE r2.question_id IS NULL;
Hello.
Perhaps this will work (depends on the version of MySQL you're using):
select question_id
, count(*)
from Records
group by question_id
having question_id not in (
select distinct question_id
from Records r
wher
Hello,
I have a simple Records table with two columns, member_id and question_id.
The object of the query is to retrieve the question_id, as well as how many
times it's been answered - as long as the current user hasn't answered it
(member_id). So, the query shouldn't return any question_id