Skip to content
Advertisement

how to order by sum of counts of many columns?

i have posts table and related with likes table ,comments table and shares table i use

JavaScript

to get posts order by likes count .

JavaScript

ِAny Suggesstion ?

Advertisement

Answer

You can use orderByRaw method

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement