Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

contar registros juntando tabelas de perguntas e respostas

select count(q.id) as cnt
from questions q
join answers a on a.question_id = q.id
where q.solved_answer_id > 0
and a.created_by = 953