SELECT r.`id`, r.`photo`, r.`userid`, p.`username`, r.`firstname`, r.`lastname`, r.`patronimic`, r.`email`,
				r.`positionname`, r.`expirience`, r.`salary_from`, r.`salary_to`, r.`expirience_total`,
				r.`area`, rarea.`name` "area_name", rarea.`sysname` "area_sysname", r.`specialization`, rspec.`sysname` "specialization_sysname",
				gc.`name` "city_name", r.`birthdate`, r.`complete`, r.`dateupdate`, r.`visibility`,
				r.`count_response`, r.`count_invite`, r.`count_reject`, r.`count_views`,
				r.`phone_favourite`, r.`phone_mobile`, r.`phone_home`, r.`phone_job`, r.`email`,
				p.`lastvisit`,
				subs.`id` "subscription",
				#Платные услуги
				rp.`id` "ResumePremium", rau.`id` "ResumeAutoupdate",
				rf.`id` "ResumeFirst", rb.`id` "ResumeBright",
				rs.`id` "ResumeSuccessful", rc.`id` "ResumeComplete",
				rd.`id` "ResumeDelivery",
				ranon.`id` "ResumeAnonymous", ranon.`company` "anonymous_company",
				#Счётчики в JSON
				CONCAT("{", GROUP_CONCAT(DISTINCT CONCAT("\"", counters.`type`, "\"", ":", counters.`value`)), "}") "counters",
				m.`mode` "moderation_mode", m.`reason` "moderation_reason", m.`dateadd` "moderation_dateadd"
				FROM `resume` r
				LEFT JOIN `rubrics` rarea ON (r.`area` = rarea.`id`)
				LEFT JOIN `rubrics` rspec ON (r.`specialization` = rspec.`id`)
				#Может показаться странным, но INNER JOIN ниже совершает проход по всей таблице `resume`
				LEFT JOIN `geo_city` gc ON (r.`city` = gc.`id`)
				LEFT JOIN `profile` p ON (r.`userid` = p.`userid`)
				LEFT JOIN `counters` ON (counters.`userid` = r.`userid`)
				LEFT JOIN `resume_specialization` s ON(s.`resume` = r.`id`)
				LEFT JOIN `subscription` subs ON (subs.`type` = 1 AND subs.`item` = r.`id`)
				
				#Премиум-резюме
				LEFT JOIN `resume_premium` rp ON(rp.`resume` = r.`id`)
				#Автообновление резюме
				LEFT JOIN `resume_autoupdate` rau ON(rau.`resume` = r.`id`)				
				#Хочу быть первым
				LEFT JOIN `resume_first` rf ON(rf.`resume` = r.`id`)
				#Яркое резюме
				LEFT JOIN `resume_bright` rb ON(rb.`resume` = r.`id`)
				#Успешное резюме
				LEFT JOIN `resume_successful` rs ON(rs.`resume` = r.`id`)
				#Готовое резюме
				LEFT JOIN `resume_complete` rc ON(rc.`resume` = r.`id`)
				#Рассылка резюме
				LEFT JOIN `resume_delivery` rd ON(rd.`resume` = r.`id`)
				#Анонимное резюме
				LEFT JOIN `resume_anonymous` ranon ON(ranon.`resume` = r.`id`)
				LEFT JOIN `moderation` m ON(m.`type` = 1 AND m.`item` = r.`id`)
				WHERE (r.`visibility` = 1)
					AND (m.`mode` IS NULL OR m.`mode` = 1)
					AND (ranon.`id` IS NULL OR r.`userid` = 0)
				AND (s.`specialization` IN (263,702,48))
				AND (
					r.`salary_from` >= 30000
					OR
					r.`salary_to` >= 30000
				)
				AND (DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW()) - TO_DAYS(r.`birthdate`)), "%Y")+0) >= 44
				AND (DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW()) - TO_DAYS(r.`birthdate`)), "%Y")+0) <= 54
			AND r.`id` <> 75891
				GROUP BY r.`id`
				ORDER BY r.`dateupdate` DESC
				 limit 2 

---------------------
162.158.78.129 28.05.2020 04:46:11  http://rabota.bvf.ru/resume/admin._personal_ofis/operator_pk/75891/