SELECT p.`id`, p.`active`, p.`nickname`, p.`sysname`, p.`descr`, p.`avatarphoto`, p.`status`, p.`style_text`,
					p.`viewcount`, p.`commentcount`, p.`ratingsumm`, p.`ratingcount`, t.`sysname` "typesys"
					FROM `profile` p
					INNER JOIN `profile_type` t ON (p.`type` = t.`id`)
					WHERE p.`show` = 1 AND p.`type` = 1
					ORDER BY p.`ratingcount` DESC, (p.`ratingsumm` / p.`ratingcount`) DESC, p.`viewcount` DESC, RAND()  limit 5 

---------------------
173.245.54.154 07.08.2020 04:45:02  http://noch.bvf.ru/profile/designer/