计数.下面是我正在使用的SQL: kennel.id,FROM kennel ONkennel.id = relationship.from_id AND (SELECT MAX(kennel.revision_id)) ON puppy.id = relationship.to_idMySQL版本:mysql Ver 14.14 Distrib 5.5.37, for deb
.*, group_concat( distinct c.color) as color, b.breeder_puppy_thumb , b.breeder_nameJOIN puppies_join_colors pjc ON p.ID = pjc.puppy_ID JOINbreeder_list b ON b.ID = p.puppy_breeder_id
WHERE