MySQL Forums
Forum List  »  Newbie

Re: GROUP_CONCAT and COUNT
Posted by: Peter Brawley
Date: October 21, 2017 08:59AM

select group_concat(person) as people, N
from (
  select p.person, count(distinct pf.id_films) as N
  from t_people p 
  join st_peoplefilms pf using(id_person) 
  where p.sex=1 
  group by p.person
) sums;

Options: ReplyQuote


Subject
Written By
Posted
October 16, 2017 09:57AM
October 16, 2017 01:07PM
October 17, 2017 09:14AM
October 20, 2017 10:52AM
October 20, 2017 11:28AM
Re: GROUP_CONCAT and COUNT
October 21, 2017 08:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.