SET SQL_AUTO_IS_NULL = 0
SELECT `clinic_clinic`.`id`, `clinic_clinic`.`meta_title`, `clinic_clinic`.`meta_keywords`,
`clinic_clinic`.`meta_description`, `clinic_clinic`.`active`, `clinic_clinic`.`date`,
`clinic_clinic`.`name`, `clinic_clinic`.`address`, `clinic_clinic`.`description`,
`clinic_clinic`.`image`, `clinic_clinic`.`rating_avg`, `clinic_clinic`.`testimonial_count`,
`clinic_clinic`.`latitude`, `clinic_clinic`.`longitude`
FROM `clinic_clinic`
WHERE `clinic_clinic`.`id` = 13 LIMIT 21
SELECT `core_specialization`.`id`, `core_specialization`.`slug`, `core_specialization`.`name`,
`core_specialization`.`name_mn`, `core_specialization`.`name_rod`, `core_specialization`.`name_im2`,
`core_specialization`.`description`
FROM `core_specialization`
WHERE `core_specialization`.`slug` = 'endokrinolog' LIMIT 21
SELECT COUNT(*)
FROM (SELECT `medic_medic`.`id` AS `id`, `medic_medic`.`meta_title` AS `meta_title`, `medic_medic`.`meta_keywords` AS `meta_keywords`,
`medic_medic`.`meta_description` AS `meta_description`, `medic_medic`.`active` AS `active`, `medic_medic`.`date` AS `date`,
`medic_medic`.`lastname` AS `lastname`, `medic_medic`.`firstname` AS `firstname`, `medic_medic`.`middlename` AS `middlename`,
`medic_medic`.`image` AS `image`, `medic_medic`.`description` AS `description`, `medic_medic`.`stage` AS `stage`,
`medic_medic`.`rating_avg` AS `rating_avg`, `medic_medic`.`specialization_id` AS `specialization_id`, `medic_medic`.`testimonial_count` AS `testimonial_count`,
COUNT(`medic_medic_clinics`.`clinic_id`) AS `clinics__count`, T6.`id` AS Col15, T6.`slug`,
T6.`name`, T6.`name_mn`, T6.`name_rod`,
T6.`name_im2`, T6.`description` AS Col21
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 45) GROUP BY `medic_medic`.`id` ORDER BY NULL) subquery
SELECT `medic_medic`.`id`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 45) GROUP BY `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count` ORDER BY `medic_medic`.`rating_avg` DESC LIMIT 1
SELECT `medic_medic_specializations`.`medic_id`, `core_specialization`.`name`
FROM `core_specialization` INNER JOIN `medic_medic_specializations` ON ( `core_specialization`.`id` = `medic_medic_specializations`.`specialization_id` )
WHERE `medic_medic_specializations`.`medic_id` IN (79) ORDER BY `core_specialization`.`name` ASC
SELECT `core_setting`.`id`, `core_setting`.`meta_title`, `core_setting`.`meta_keywords`,
`core_setting`.`meta_description`, `core_setting`.`name`, `core_setting`.`from_email`,
`core_setting`.`notification_emails`, `core_setting`.`description`, `core_setting`.`static_block_id`,
`core_setting`.`phone_code`, `core_setting`.`phone_number`, `core_setting`.`worktime`,
`core_setting`.`address`, `core_setting`.`footer`, `core_setting`.`soc_facebook`,
`core_setting`.`soc_twitter`, `core_setting`.`soc_vkontakte`, `core_setting`.`soc_gplus`
FROM `core_setting`
WHERE `core_setting`.`id` = 1 LIMIT 21
SELECT `core_specialization`.`id`, `core_specialization`.`slug`, `core_specialization`.`name`,
`core_specialization`.`name_mn`, `core_specialization`.`name_rod`, `core_specialization`.`name_im2`,
`core_specialization`.`description`
FROM `core_specialization` INNER JOIN `clinic_clinic_specializations` ON ( `core_specialization`.`id` = `clinic_clinic_specializations`.`specialization_id` )
WHERE `clinic_clinic_specializations`.`clinic_id` = 13 ORDER BY `core_specialization`.`name` ASC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 2) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 5) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 6) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 9) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 10) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 11) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 12) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 15) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 17) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 18) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 19) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 23) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 25) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 26) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 27) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 28) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 29) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 33) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 39) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 42) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 43) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 44) ORDER BY `medic_medic`.`date` DESC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
T6.`id`, T6.`slug`, T6.`name`,
T6.`name_mn`, T6.`name_rod`, T6.`name_im2`,
T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 45) ORDER BY `medic_medic`.`date` DESC
SELECT `core_setting`.`id`, `core_setting`.`meta_title`, `core_setting`.`meta_keywords`,
`core_setting`.`meta_description`, `core_setting`.`name`, `core_setting`.`from_email`,
`core_setting`.`notification_emails`, `core_setting`.`description`, `core_setting`.`static_block_id`,
`core_setting`.`phone_code`, `core_setting`.`phone_number`, `core_setting`.`worktime`,
`core_setting`.`address`, `core_setting`.`footer`, `core_setting`.`soc_facebook`,
`core_setting`.`soc_twitter`, `core_setting`.`soc_vkontakte`, `core_setting`.`soc_gplus`
FROM `core_setting`
WHERE `core_setting`.`id` = 1 LIMIT 21
SELECT `core_specialization`.`id`, `core_specialization`.`slug`, `core_specialization`.`name`,
`core_specialization`.`name_mn`, `core_specialization`.`name_rod`, `core_specialization`.`name_im2`,
`core_specialization`.`description`
FROM `core_specialization` ORDER BY `core_specialization`.`name` ASC
SELECT `core_metro`.`id`, `core_metro`.`position`, `core_metro`.`slug`,
`core_metro`.`name`, `core_metro`.`code`, `core_metro`.`line`,
`core_metro`.`latitude`, `core_metro`.`longitude`
FROM `core_metro` INNER JOIN `clinic_clinic_metro` ON ( `core_metro`.`id` = `clinic_clinic_metro`.`metro_id` )
WHERE `clinic_clinic_metro`.`clinic_id` = 13 ORDER BY `core_metro`.`position` ASC
SELECT `core_city`.`id`, `core_city`.`position`, `core_city`.`slug`,
`core_city`.`name`, `core_city`.`region`, `core_city`.`latitude`,
`core_city`.`longitude`
FROM `core_city` INNER JOIN `clinic_clinic_cities` ON ( `core_city`.`id` = `clinic_clinic_cities`.`city_id` )
WHERE `clinic_clinic_cities`.`clinic_id` = 13 ORDER BY `core_city`.`position` ASC
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
COUNT(`medic_medic_clinics`.`clinic_id`) AS `clinics__count`, T6.`id`, T6.`slug`,
T6.`name`, T6.`name_mn`, T6.`name_rod`,
T6.`name_im2`, T6.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `medic_medic_specializations` ON ( `medic_medic`.`id` = `medic_medic_specializations`.`medic_id` ) INNER JOIN `core_specialization` T6 ON ( `medic_medic`.`specialization_id` = T6.`id` )
WHERE (`medic_medic`.`active` = 1 AND `medic_medic_clinics`.`clinic_id` = 13 AND `medic_medic_specializations`.`specialization_id` = 45) GROUP BY `medic_medic`.`id` ORDER BY `medic_medic`.`rating_avg` DESC LIMIT 1
SELECT `medic_medic`.`id`, `medic_medic`.`meta_title`, `medic_medic`.`meta_keywords`,
`medic_medic`.`meta_description`, `medic_medic`.`active`, `medic_medic`.`date`,
`medic_medic`.`lastname`, `medic_medic`.`firstname`, `medic_medic`.`middlename`,
`medic_medic`.`image`, `medic_medic`.`description`, `medic_medic`.`stage`,
`medic_medic`.`rating_avg`, `medic_medic`.`specialization_id`, `medic_medic`.`testimonial_count`,
`core_specialization`.`id`, `core_specialization`.`slug`, `core_specialization`.`name`,
`core_specialization`.`name_mn`, `core_specialization`.`name_rod`, `core_specialization`.`name_im2`,
`core_specialization`.`description`
FROM `medic_medic` INNER JOIN `medic_medic_clinics` ON ( `medic_medic`.`id` = `medic_medic_clinics`.`medic_id` ) INNER JOIN `core_specialization` ON ( `medic_medic`.`specialization_id` = `core_specialization`.`id` )
WHERE `medic_medic_clinics`.`clinic_id` = 13 ORDER BY `medic_medic`.`rating_avg` DESC, `medic_medic`.`date` DESC LIMIT 3