A Database Error Occurred

Error Number: 3029

Expression #1 of ORDER BY contains aggregate function and applies to the result of a non-aggregated query

SELECT * FROM `tbl_product` WHERE `groupid` = '1' AND FIND_IN_SET ('4', tbl_product.brand_id) ORDER BY count(tbl_product.id) DESC

Filename: libraries/Basemodel.php

Line Number: 99