You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somhow I couldn't find any info on the topic of filtering by aggregates, so here's my quesion. I have two models: Group -{has many}-> Student. I would like to filter all groups with average student age more then Y (age is a calculated field, e.g. AVG(TIMESTAMPDIFF(YEAR, person.dob, NOW())) AS age)
I am pretty new to Laravel in general, so sorry if this is not a question about filters exactly.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered:
Hi.
Somhow I couldn't find any info on the topic of filtering by aggregates, so here's my quesion. I have two models:
Group -{has many}-> Student
. I would like to filter all groups with average student age more then Y (age is a calculated field, e.g.AVG(TIMESTAMPDIFF(YEAR, person.dob, NOW())) AS age
)I am pretty new to Laravel in general, so sorry if this is not a question about filters exactly.
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: