0
How do I get the two records with the highest view of each category? I have 7 categories and would like to pick up the two items with higher views of each of these 7 categories.
0
How do I get the two records with the highest view of each category? I have 7 categories and would like to pick up the two items with higher views of each of these 7 categories.
Browser other questions tagged mysqli php-7.1
You are not signed in. Login or sign up in order to post.
Sort by view, if necessary group the categories, Order by view goes down
– Paulo Rodolfo
The sort I know how to do, but how do I query and get the two items from each category? And of course, if there is more than one item in each category, because I can only have one entry in category A and 15 in category B. You will have to return a record in category A and two in category B.
– Felipe Paz
take the two largest , by category. This view comes in each line along with the category
– Paulo Rodolfo