[eluser]m_ologin[/eluser]
Hi community,
How can I create the active record query for this :
Code:
SELECT sum(s1) AS max_pts FROM (SELECT max(a.nb_points) AS s1 FROM t_ans a LEFT JOIN t_qu q ON a.id_qu = q.id WHERE a.is_correct=1 GROUP BY a.id_question) AS st1