Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MySQL結合テーブルから返された行数を数えようとしています。つまり:
select *, count(pets.id) as pets_per_owner from owners left join pets on owners.id=pets.owner_id
問題は、結合されたすべての行がグループ化されていることです。
これらの小計を取得する方法はありますが、個別のクエリなしで返された (グループ化されていない) すべての行を表示しますか?
ティア