MySQLの別のテーブルのオカレンス数を取得したいです。
私の現在のクエリは次のようになります。
SELECT
teilnehmer.`name`,
teilnehmer.`status`
FROM
teilnehmer
INNER JOIN chat ON chat.cid = teilnehmer.id
INNER JOIN videos ON videos.tid = teilnehmer.id
GROUP BY
chat.id,
videos.tid
chat.cid の teilnehmer.id の量と、videos.tid の teilehmer.id の量が必要です。
どうやってやるの?