K
K
kkolorid2020-04-17 18:48:42
Yii
kkolorid, 2020-04-17 18:48:42

How to get product brands sorted by views from the database?

Good day. There is a table with goods. Fields: id, name, brand (name), number of product views by users

It is necessary to list brands in a certain part of the site, sorted by the sum of the number of views of products under this brand. (Most Popular Brands)

I can't figure out how to organize this whole thing in the Yii2 Model Query Builder...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question