| 2 |
1.00 ms |
SELECT b0_.id AS id_0, b0_.salon_name AS salon_name_1, b0_.slug AS slug_2, b0_.description_fr AS description_fr_3, b0_.description_en AS description_en_4, b0_.address AS address_5, b0_.city AS city_6, b0_.latitude AS latitude_7, b0_.longitude AS longitude_8, b0_.languages AS languages_9, b0_.transport_info AS transport_info_10, b0_.transport_info_en AS transport_info_en_11, b0_.payment_methods AS payment_methods_12, b0_.subscription_plan AS subscription_plan_13, b0_.salon_type AS salon_type_14, b0_.salon_categories AS salon_categories_15, b0_.is_verified AS is_verified_16, b0_.is_active AS is_active_17, b0_.offer_home_visit AS offer_home_visit_18, b0_.home_visit_radius AS home_visit_radius_19, b0_.staff_appointment_management AS staff_appointment_management_20, b0_.phone AS phone_21, b0_.website AS website_22, b0_.instagram AS instagram_23, b0_.facebook AS facebook_24, b0_.tiktok AS tiktok_25, b0_.created_at AS created_at_26, u1_.id AS id_27, u1_.email AS email_28, u1_.roles AS roles_29, u1_.password AS password_30, u1_.first_name AS first_name_31, u1_.last_name AS last_name_32, u1_.phone AS phone_33, u1_.avatar AS avatar_34, u1_.preferred_language AS preferred_language_35, u1_.created_at AS created_at_36, u1_.is_active AS is_active_37, u1_.is_verified AS is_verified_38, u1_.referral_code AS referral_code_39, u1_.wallet_balance AS wallet_balance_40, b0_.user_id AS user_id_41, u1_.referred_by_id AS referred_by_id_42 FROM barber_profile b0_ LEFT JOIN `user` u1_ ON b0_.user_id = u1_.id LEFT JOIN service s2_ ON b0_.id = s2_.barber_profile_id LEFT JOIN review r3_ ON b0_.id = r3_.barber_profile_id AND (r3_.is_hidden = 0) WHERE b0_.is_active = 1 AND LOWER(b0_.city) LIKE LOWER(?) GROUP BY b0_.id, u1_.id ORDER BY CASE WHEN b0_.subscription_plan = 'premium_plus' THEN 0 WHEN b0_.subscription_plan = 'premium' THEN 1 ELSE 2 END ASC, AVG(r3_.rating) DESC
Parameters: [
"%Djerba Houmt Souk%"
]
SELECT
b0_.id AS id_0,
b0_.salon_name AS salon_name_1,
b0_.slug AS slug_2,
b0_.description_fr AS description_fr_3,
b0_.description_en AS description_en_4,
b0_.address AS address_5,
b0_.city AS city_6,
b0_.latitude AS latitude_7,
b0_.longitude AS longitude_8,
b0_.languages AS languages_9,
b0_.transport_info AS transport_info_10,
b0_.transport_info_en AS transport_info_en_11,
b0_.payment_methods AS payment_methods_12,
b0_.subscription_plan AS subscription_plan_13,
b0_.salon_type AS salon_type_14,
b0_.salon_categories AS salon_categories_15,
b0_.is_verified AS is_verified_16,
b0_.is_active AS is_active_17,
b0_.offer_home_visit AS offer_home_visit_18,
b0_.home_visit_radius AS home_visit_radius_19,
b0_.staff_appointment_management AS staff_appointment_management_20,
b0_.phone AS phone_21,
b0_.website AS website_22,
b0_.instagram AS instagram_23,
b0_.facebook AS facebook_24,
b0_.tiktok AS tiktok_25,
b0_.created_at AS created_at_26,
u1_.id AS id_27,
u1_.email AS email_28,
u1_.roles AS roles_29,
u1_.password AS password_30,
u1_.first_name AS first_name_31,
u1_.last_name AS last_name_32,
u1_.phone AS phone_33,
u1_.avatar AS avatar_34,
u1_.preferred_language AS preferred_language_35,
u1_.created_at AS created_at_36,
u1_.is_active AS is_active_37,
u1_.is_verified AS is_verified_38,
u1_.referral_code AS referral_code_39,
u1_.wallet_balance AS wallet_balance_40,
b0_.user_id AS user_id_41,
u1_.referred_by_id AS referred_by_id_42
FROM
barber_profile b0_
LEFT JOIN `user` u1_ ON b0_.user_id = u1_.id
LEFT JOIN service s2_ ON b0_.id = s2_.barber_profile_id
LEFT JOIN review r3_ ON b0_.id = r3_.barber_profile_id
AND (r3_.is_hidden = 0)
WHERE
b0_.is_active = 1
AND LOWER(b0_.city) LIKE LOWER(?)
GROUP BY
b0_.id,
u1_.id
ORDER BY
CASE WHEN b0_.subscription_plan = 'premium_plus' THEN
0
WHEN b0_.subscription_plan = 'premium' THEN
1
ELSE
2
END ASC,
AVG(r3_.rating) DESC
SELECT b0_.id AS id_0, b0_.salon_name AS salon_name_1, b0_.slug AS slug_2, b0_.description_fr AS description_fr_3, b0_.description_en AS description_en_4, b0_.address AS address_5, b0_.city AS city_6, b0_.latitude AS latitude_7, b0_.longitude AS longitude_8, b0_.languages AS languages_9, b0_.transport_info AS transport_info_10, b0_.transport_info_en AS transport_info_en_11, b0_.payment_methods AS payment_methods_12, b0_.subscription_plan AS subscription_plan_13, b0_.salon_type AS salon_type_14, b0_.salon_categories AS salon_categories_15, b0_.is_verified AS is_verified_16, b0_.is_active AS is_active_17, b0_.offer_home_visit AS offer_home_visit_18, b0_.home_visit_radius AS home_visit_radius_19, b0_.staff_appointment_management AS staff_appointment_management_20, b0_.phone AS phone_21, b0_.website AS website_22, b0_.instagram AS instagram_23, b0_.facebook AS facebook_24, b0_.tiktok AS tiktok_25, b0_.created_at AS created_at_26, u1_.id AS id_27, u1_.email AS email_28, u1_.roles AS roles_29, u1_.password AS password_30, u1_.first_name AS first_name_31, u1_.last_name AS last_name_32, u1_.phone AS phone_33, u1_.avatar AS avatar_34, u1_.preferred_language AS preferred_language_35, u1_.created_at AS created_at_36, u1_.is_active AS is_active_37, u1_.is_verified AS is_verified_38, u1_.referral_code AS referral_code_39, u1_.wallet_balance AS wallet_balance_40, b0_.user_id AS user_id_41, u1_.referred_by_id AS referred_by_id_42 FROM barber_profile b0_ LEFT JOIN `user` u1_ ON b0_.user_id = u1_.id LEFT JOIN service s2_ ON b0_.id = s2_.barber_profile_id LEFT JOIN review r3_ ON b0_.id = r3_.barber_profile_id AND (r3_.is_hidden = 0) WHERE b0_.is_active = 1 AND LOWER(b0_.city) LIKE LOWER('%Djerba Houmt Souk%') GROUP BY b0_.id, u1_.id ORDER BY CASE WHEN b0_.subscription_plan = 'premium_plus' THEN 0 WHEN b0_.subscription_plan = 'premium' THEN 1 ELSE 2 END ASC, AVG(r3_.rating) DESC;
|
| 4 |
0.30 ms |
SELECT t0.id AS id_1, t0.rating AS rating_2, t0.rating_ambiance AS rating_ambiance_3, t0.rating_rapport_qp AS rating_rapport_qp_4, t0.rating_resultats AS rating_resultats_5, t0.comment AS comment_6, t0.is_hidden AS is_hidden_7, t0.is_reported AS is_reported_8, t0.professional_reply AS professional_reply_9, t0.replied_at AS replied_at_10, t0.created_at AS created_at_11, t0.client_id AS client_id_12, t0.barber_profile_id AS barber_profile_id_13, t0.appointment_id AS appointment_id_14 FROM review t0 WHERE t0.barber_profile_id = ?
SELECT t0.id AS id_1, t0.rating AS rating_2, t0.rating_ambiance AS rating_ambiance_3, t0.rating_rapport_qp AS rating_rapport_qp_4, t0.rating_resultats AS rating_resultats_5, t0.comment AS comment_6, t0.is_hidden AS is_hidden_7, t0.is_reported AS is_reported_8, t0.professional_reply AS professional_reply_9, t0.replied_at AS replied_at_10, t0.created_at AS created_at_11, t0.client_id AS client_id_12, t0.barber_profile_id AS barber_profile_id_13, t0.appointment_id AS appointment_id_14 FROM review t0 WHERE t0.barber_profile_id = 65;
|
| 5 |
0.25 ms |
SELECT t0.id AS id_1, t0.name AS name_2, t0.category AS category_3, t0.sub_category AS sub_category_4, t0.audience AS audience_5, t0.duration_minutes AS duration_minutes_6, t0.duration_max_minutes AS duration_max_minutes_7, t0.price AS price_8, t0.description_fr AS description_fr_9, t0.description_en AS description_en_10, t0.happy_hours_discount AS happy_hours_discount_11, t0.happy_hours_slot AS happy_hours_slot_12, t0.is_active AS is_active_13, t0.barber_profile_id AS barber_profile_id_14 FROM service t0 WHERE t0.barber_profile_id = ?
SELECT t0.id AS id_1, t0.name AS name_2, t0.category AS category_3, t0.sub_category AS sub_category_4, t0.audience AS audience_5, t0.duration_minutes AS duration_minutes_6, t0.duration_max_minutes AS duration_max_minutes_7, t0.price AS price_8, t0.description_fr AS description_fr_9, t0.description_en AS description_en_10, t0.happy_hours_discount AS happy_hours_discount_11, t0.happy_hours_slot AS happy_hours_slot_12, t0.is_active AS is_active_13, t0.barber_profile_id AS barber_profile_id_14 FROM service t0 WHERE t0.barber_profile_id = 65;
|