there are three fields (: score (score) and userid,subject (discipline) in the data table tbscore. The effect I want to achieve is:
select sum(score),subject from (select score,subject from tbscore where userid in(1,2,3)) group by subject
that is, you want to filter out the result set first, and then group by, the result set. How to write
in laravel?