SELECT v.`id`, v.`userid`, v.`positionname`, v.`salary_from`, v.`salary_to`, v.`dateupdate`,
				v.`company`, c.`name` "company_name", c.`photo` "company_photo",
				c.`checked` "company_checked", crub.`sysname` "company_area_sysname",
				v.`agency`, a.`name` "agency_name", a.`photo` "agency_photo",
				a.`checked` "agency_checked",
				gc.`name` "city_name", varea.`name` "area_name", varea.`sysname` "area_sysname", vspec.`sysname` "specialization_sysname",
				v.`visibility`, v.`count_views`, v.`count_response`, v.`count_response_new`, v.`count_invite`,
				vex.`mode` "exclusive_mode",
				#Платные услуги
				vbrig.`id` "VacancyBright", vanon.`id` "VacancyAnonymous",
				m.`mode` "moderation_mode", m.`reason` "moderation_reason", m.`dateadd` "moderation_dateadd"
				FROM `vacancy` v
				#INNER JOIN компаний и рубрик компаний приводит к полному проходу по таблице компаний
				LEFT JOIN `company` c ON (v.`company` = c.`id`)
				LEFT JOIN `rubrics` crub ON (c.`area` = crub.`id`)
				LEFT JOIN `agency` a ON (v.`agency` = a.`id`)
				INNER JOIN `rubrics` varea ON (v.`area` = varea.`id`)
				INNER JOIN `rubrics` vspec ON (v.`specialization` = vspec.`id`)
				LEFT JOIN `geo_city` gc ON (v.`city` = gc.`id`)
				LEFT JOIN `vacancy_specialization` s ON (s.`vacancy` = v.`id`)
				LEFT JOIN `vacancy_exclusive` vex ON (vex.`vacancy` = v.`id`)
				LEFT JOIN `vacancy_bright` vbrig ON(vbrig.`vacancy` = v.`id`)
				LEFT JOIN `vacancy_anonymous` vanon ON(vanon.`vacancy` = v.`id`)
				LEFT JOIN `moderation` m ON(m.`type` = 2 AND m.`item` = v.`id`)
				WHERE v.`visibility` = 1
					AND (c.`visibility` = 1 OR a.`visibility` = 1)
					AND m.`mode` = 1
				AND (s.`specialization` = 522)
				AND v.`city` IN (3521)
				AND v.`salary_from` >= 22000
			AND v.`id` <> 21598
				GROUP BY v.`id`
				ORDER BY `VacancyBright` DESC, v.`dateupdate` DESC limit 2 

---------------------
173.245.54.92 07.06.2020 07:49:13  http://rabota.bvf.ru/vacancy/marketing_reklama_pr/internet-marketing/21598/