SELECT SUM(r.consultant_rate)/count(c1.consultant_id) avgf,
count(c1.consultant_id) nofcon,c2.first_name,c2.category,c2.username,c2.email,c2.status,c2.about_me,c2.gender from consultations_consultation c1 RIGHT JOIN authentications_member c2 ON c1.consultant_id = c2.id
RIGHT JOIN consultations_review r ON r.consultation_id = c1.id
GROUP BY c2.first_name,c2.category,c2.username,c2.email,c2.status,c2.about_me,c2.gender
Comments
Post a Comment