подбор серверов по параметрам

Mysql error: Unknown column 'num_sales' in 'order clause'
Error code: 1054
Query: SELECT DISTINCT catalog_models.CountryOriginID FROM catalog_models LEFT JOIN shop_orders_models ON shop_orders_models.ModelID = catalog_models.ID WHERE catalog_models.Status != 200 AND catalog_models.Source != 'ad' AND (shop_orders_models.ID IS NULL OR TIMESTAMPDIFF(DAY, shop_orders_models.Created, NOW()) <= 30) AND catalog_models.HideIndex = ? GROUP BY catalog_models.ID ORDER BY num_sales DESC
Params:
Array
(
    [0] => 
)

Топ товаров

Не найдено товаров
Пн-Сб: с 9 до 21, Вс: с 9 до 20