2
2.12 ms
SELECT COUNT (* ) AS dctrn_count FROM (SELECT DISTINCT id_0 FROM (SELECT p0_ . id AS id_0 , p0_ . is_active AS is_active_1 , p0_ . title AS title_2 , p0_ . short_description AS short_description_3 , p0_ . description AS description_4 , p0_ . pricing_type AS pricing_type_5 , p0_ . price_from AS price_from_6 , p0_ . price_to AS price_to_7 , p0_ . price_unit AS price_unit_8 , p0_ . additional_info AS additional_info_9 , p0_ . position AS position_10 , p0_ . prix_catalogue AS prix_catalogue_11 , p0_ . taux_reduction AS taux_reduction_12 , p0_ . promotion_created_at AS promotion_created_at_13 , p0_ . created_at AS created_at_14 , p0_ . updated_at AS updated_at_15 , p0_ . slug AS slug_16 , p1_ . id AS id_17 , p1_ . company_name AS company_name_18 , p1_ . slug AS slug_19 , p1_ . legal_name AS legal_name_20 , p1_ . structure_type AS structure_type_21 , p1_ . siren AS siren_22 , p1_ . siret AS siret_23 , p1_ . vat_number AS vat_number_24 , p1_ . address AS address_25 , p1_ . address_complement AS address_complement_26 , p1_ . postal_code AS postal_code_27 , p1_ . city AS city_28 , p1_ . country AS country_29 , p1_ . latitude AS latitude_30 , p1_ . longitude AS longitude_31 , p1_ . geohash AS geohash_32 , p1_ . phone_public AS phone_public_33 , p1_ . phone_private AS phone_private_34 , p1_ . website AS website_35 , p1_ . facebook_url AS facebook_url_36 , p1_ . instagram_url AS instagram_url_37 , p1_ . linkedin_url AS linkedin_url_38 , p1_ . short_description AS short_description_39 , p1_ . long_description AS long_description_40 , p1_ . logo AS logo_41 , p1_ . cover_image AS cover_image_42 , p1_ . profile_status AS profile_status_43 , p1_ . verification_status AS verification_status_44 , p1_ . completion_score AS completion_score_45 , p1_ . average_rating AS average_rating_46 , p1_ . reviews_count AS reviews_count_47 , p1_ . response_time_minutes AS response_time_minutes_48 , p1_ . is_featured AS is_featured_49 , p1_ . featured_until AS featured_until_50 , p1_ . search_visibility AS search_visibility_51 , p1_ . verified_at AS verified_at_52 , p1_ . created_at AS created_at_53 , p1_ . updated_at AS updated_at_54 , p1_ . deleted_at AS deleted_at_55 , p1_ . description AS description_56 , p1_ . metier AS metier_57 , p1_ . experience AS experience_58 , s2_ . id AS id_59 , s2_ . name AS name_60 , s2_ . slug AS slug_61 , s2_ . description AS description_62 , s2_ . icon AS icon_63 , s2_ . average_price_min AS average_price_min_64 , s2_ . average_price_max AS average_price_max_65 , s2_ . position AS position_66 , s2_ . is_active AS is_active_67 , s2_ . created_at AS created_at_68 , s2_ . updated_at AS updated_at_69 , u3_ . id AS id_70 , u3_ . email AS email_71 , u3_ . roles AS roles_72 , u3_ . password AS password_73 , u3_ . first_name AS first_name_74 , u3_ . last_name AS last_name_75 , u3_ . phone_number AS phone_number_76 , u3_ . phone_verified_at AS phone_verified_at_77 , u3_ . email_verified_at AS email_verified_at_78 , u3_ . is_verified AS is_verified_79 , u3_ . avatar AS avatar_80 , u3_ . locale AS locale_81 , u3_ . timezone AS timezone_82 , u3_ . status AS status_83 , u3_ . last_login_at AS last_login_at_84 , u3_ . login_count AS login_count_85 , u3_ . reset_token AS reset_token_86 , u3_ . reset_token_expires_at AS reset_token_expires_at_87 , u3_ . created_at AS created_at_88 , u3_ . updated_at AS updated_at_89 , u3_ . deleted_at AS deleted_at_90 , s4_ . id AS id_91 , s4_ . name AS name_92 , s4_ . slug AS slug_93 , s4_ . description AS description_94 , s4_ . icon AS icon_95 , s4_ . image AS image_96 , s4_ . position AS position_97 , s4_ . color AS color_98 , s4_ . seo_title AS seo_title_99 , s4_ . seo_description AS seo_description_100 , s4_ . created_at AS created_at_101 , s4_ . updated_at AS updated_at_102 , s4_ . is_active AS is_active_103 , s5_ . id AS id_104 , s5_ . name AS name_105 , s5_ . slug AS slug_106 , s5_ . description AS description_107 , s5_ . icon AS icon_108 , s5_ . image AS image_109 , s5_ . position AS position_110 , s5_ . color AS color_111 , s5_ . seo_title AS seo_title_112 , s5_ . seo_description AS seo_description_113 , s5_ . created_at AS created_at_114 , s5_ . updated_at AS updated_at_115 , s5_ . is_active AS is_active_116 FROM prestataire_profile_service p0_ INNER JOIN prestataire_profile p1_ ON p0_ . prestataire_profile_id = p1_ . id INNER JOIN service s2_ ON p0_ . service_id = s2_ . id LEFT JOIN "user" u3_ ON p1_ . user_id = u3_ . id LEFT JOIN service_category s4_ ON s2_ . category_id = s4_ . id LEFT JOIN service_category s5_ ON s4_ . parent_id = s5_ . id WHERE p1_ . profile_status = ? AND p0_ . is_active = ? AND p0_ . taux_reduction IS NOT NULL AND p0_ . taux_reduction > 0 ORDER BY p0_ . taux_reduction DESC , p0_ . id DESC ) dctrn_result ) dctrn_table
Parameters :
[
"ACTIVE "
1
]
SELECT
COUNT (* ) AS dctrn_count
FROM
(
SELECT
DISTINCT id_0
FROM
(
SELECT
p0_ . id AS id_0 ,
p0_ . is_active AS is_active_1 ,
p0_ . title AS title_2 ,
p0_ . short_description AS short_description_3 ,
p0_ . description AS description_4 ,
p0_ . pricing_type AS pricing_type_5 ,
p0_ . price_from AS price_from_6 ,
p0_ . price_to AS price_to_7 ,
p0_ . price_unit AS price_unit_8 ,
p0_ . additional_info AS additional_info_9 ,
p0_ . position AS position_10 ,
p0_ . prix_catalogue AS prix_catalogue_11 ,
p0_ . taux_reduction AS taux_reduction_12 ,
p0_ . promotion_created_at AS promotion_created_at_13 ,
p0_ . created_at AS created_at_14 ,
p0_ . updated_at AS updated_at_15 ,
p0_ . slug AS slug_16 ,
p1_ . id AS id_17 ,
p1_ . company_name AS company_name_18 ,
p1_ . slug AS slug_19 ,
p1_ . legal_name AS legal_name_20 ,
p1_ . structure_type AS structure_type_21 ,
p1_ . siren AS siren_22 ,
p1_ . siret AS siret_23 ,
p1_ . vat_number AS vat_number_24 ,
p1_ . address AS address_25 ,
p1_ . address_complement AS address_complement_26 ,
p1_ . postal_code AS postal_code_27 ,
p1_ . city AS city_28 ,
p1_ . country AS country_29 ,
p1_ . latitude AS latitude_30 ,
p1_ . longitude AS longitude_31 ,
p1_ . geohash AS geohash_32 ,
p1_ . phone_public AS phone_public_33 ,
p1_ . phone_private AS phone_private_34 ,
p1_ . website AS website_35 ,
p1_ . facebook_url AS facebook_url_36 ,
p1_ . instagram_url AS instagram_url_37 ,
p1_ . linkedin_url AS linkedin_url_38 ,
p1_ . short_description AS short_description_39 ,
p1_ . long_description AS long_description_40 ,
p1_ . logo AS logo_41 ,
p1_ . cover_image AS cover_image_42 ,
p1_ . profile_status AS profile_status_43 ,
p1_ . verification_status AS verification_status_44 ,
p1_ . completion_score AS completion_score_45 ,
p1_ . average_rating AS average_rating_46 ,
p1_ . reviews_count AS reviews_count_47 ,
p1_ . response_time_minutes AS response_time_minutes_48 ,
p1_ . is_featured AS is_featured_49 ,
p1_ . featured_until AS featured_until_50 ,
p1_ . search_visibility AS search_visibility_51 ,
p1_ . verified_at AS verified_at_52 ,
p1_ . created_at AS created_at_53 ,
p1_ . updated_at AS updated_at_54 ,
p1_ . deleted_at AS deleted_at_55 ,
p1_ . description AS description_56 ,
p1_ . metier AS metier_57 ,
p1_ . experience AS experience_58 ,
s2_ . id AS id_59 ,
s2_ . name AS name_60 ,
s2_ . slug AS slug_61 ,
s2_ . description AS description_62 ,
s2_ . icon AS icon_63 ,
s2_ . average_price_min AS average_price_min_64 ,
s2_ . average_price_max AS average_price_max_65 ,
s2_ . position AS position_66 ,
s2_ . is_active AS is_active_67 ,
s2_ . created_at AS created_at_68 ,
s2_ . updated_at AS updated_at_69 ,
u3_ . id AS id_70 ,
u3_ . email AS email_71 ,
u3_ . roles AS roles_72 ,
u3_ . password AS password_73 ,
u3_ . first_name AS first_name_74 ,
u3_ . last_name AS last_name_75 ,
u3_ . phone_number AS phone_number_76 ,
u3_ . phone_verified_at AS phone_verified_at_77 ,
u3_ . email_verified_at AS email_verified_at_78 ,
u3_ . is_verified AS is_verified_79 ,
u3_ . avatar AS avatar_80 ,
u3_ . locale AS locale_81 ,
u3_ . timezone AS timezone_82 ,
u3_ . status AS status_83 ,
u3_ . last_login_at AS last_login_at_84 ,
u3_ . login_count AS login_count_85 ,
u3_ . reset_token AS reset_token_86 ,
u3_ . reset_token_expires_at AS reset_token_expires_at_87 ,
u3_ . created_at AS created_at_88 ,
u3_ . updated_at AS updated_at_89 ,
u3_ . deleted_at AS deleted_at_90 ,
s4_ . id AS id_91 ,
s4_ . name AS name_92 ,
s4_ . slug AS slug_93 ,
s4_ . description AS description_94 ,
s4_ . icon AS icon_95 ,
s4_ . image AS image_96 ,
s4_ . position AS position_97 ,
s4_ . color AS color_98 ,
s4_ . seo_title AS seo_title_99 ,
s4_ . seo_description AS seo_description_100 ,
s4_ . created_at AS created_at_101 ,
s4_ . updated_at AS updated_at_102 ,
s4_ . is_active AS is_active_103 ,
s5_ . id AS id_104 ,
s5_ . name AS name_105 ,
s5_ . slug AS slug_106 ,
s5_ . description AS description_107 ,
s5_ . icon AS icon_108 ,
s5_ . image AS image_109 ,
s5_ . position AS position_110 ,
s5_ . color AS color_111 ,
s5_ . seo_title AS seo_title_112 ,
s5_ . seo_description AS seo_description_113 ,
s5_ . created_at AS created_at_114 ,
s5_ . updated_at AS updated_at_115 ,
s5_ . is_active AS is_active_116
FROM
prestataire_profile_service p0_
INNER JOIN prestataire_profile p1_ ON p0_ . prestataire_profile_id = p1_ . id
INNER JOIN service s2_ ON p0_ . service_id = s2_ . id
LEFT JOIN "user" u3_ ON p1_ . user_id = u3_ . id
LEFT JOIN service_category s4_ ON s2_ . category_id = s4_ . id
LEFT JOIN service_category s5_ ON s4_ . parent_id = s5_ . id
WHERE
p1_ . profile_status = ?
AND p0_ . is_active = ?
AND p0_ . taux_reduction IS NOT NULL
AND p0_ . taux_reduction > 0
ORDER BY
p0_ . taux_reduction DESC ,
p0_ . id DESC
) dctrn_result
) dctrn_table
Copy
SELECT COUNT (* ) AS dctrn_count FROM (SELECT DISTINCT id_0 FROM (SELECT p0_ . id AS id_0 , p0_ . is_active AS is_active_1 , p0_ . title AS title_2 , p0_ . short_description AS short_description_3 , p0_ . description AS description_4 , p0_ . pricing_type AS pricing_type_5 , p0_ . price_from AS price_from_6 , p0_ . price_to AS price_to_7 , p0_ . price_unit AS price_unit_8 , p0_ . additional_info AS additional_info_9 , p0_ . position AS position_10 , p0_ . prix_catalogue AS prix_catalogue_11 , p0_ . taux_reduction AS taux_reduction_12 , p0_ . promotion_created_at AS promotion_created_at_13 , p0_ . created_at AS created_at_14 , p0_ . updated_at AS updated_at_15 , p0_ . slug AS slug_16 , p1_ . id AS id_17 , p1_ . company_name AS company_name_18 , p1_ . slug AS slug_19 , p1_ . legal_name AS legal_name_20 , p1_ . structure_type AS structure_type_21 , p1_ . siren AS siren_22 , p1_ . siret AS siret_23 , p1_ . vat_number AS vat_number_24 , p1_ . address AS address_25 , p1_ . address_complement AS address_complement_26 , p1_ . postal_code AS postal_code_27 , p1_ . city AS city_28 , p1_ . country AS country_29 , p1_ . latitude AS latitude_30 , p1_ . longitude AS longitude_31 , p1_ . geohash AS geohash_32 , p1_ . phone_public AS phone_public_33 , p1_ . phone_private AS phone_private_34 , p1_ . website AS website_35 , p1_ . facebook_url AS facebook_url_36 , p1_ . instagram_url AS instagram_url_37 , p1_ . linkedin_url AS linkedin_url_38 , p1_ . short_description AS short_description_39 , p1_ . long_description AS long_description_40 , p1_ . logo AS logo_41 , p1_ . cover_image AS cover_image_42 , p1_ . profile_status AS profile_status_43 , p1_ . verification_status AS verification_status_44 , p1_ . completion_score AS completion_score_45 , p1_ . average_rating AS average_rating_46 , p1_ . reviews_count AS reviews_count_47 , p1_ . response_time_minutes AS response_time_minutes_48 , p1_ . is_featured AS is_featured_49 , p1_ . featured_until AS featured_until_50 , p1_ . search_visibility AS search_visibility_51 , p1_ . verified_at AS verified_at_52 , p1_ . created_at AS created_at_53 , p1_ . updated_at AS updated_at_54 , p1_ . deleted_at AS deleted_at_55 , p1_ . description AS description_56 , p1_ . metier AS metier_57 , p1_ . experience AS experience_58 , s2_ . id AS id_59 , s2_ . name AS name_60 , s2_ . slug AS slug_61 , s2_ . description AS description_62 , s2_ . icon AS icon_63 , s2_ . average_price_min AS average_price_min_64 , s2_ . average_price_max AS average_price_max_65 , s2_ . position AS position_66 , s2_ . is_active AS is_active_67 , s2_ . created_at AS created_at_68 , s2_ . updated_at AS updated_at_69 , u3_ . id AS id_70 , u3_ . email AS email_71 , u3_ . roles AS roles_72 , u3_ . password AS password_73 , u3_ . first_name AS first_name_74 , u3_ . last_name AS last_name_75 , u3_ . phone_number AS phone_number_76 , u3_ . phone_verified_at AS phone_verified_at_77 , u3_ . email_verified_at AS email_verified_at_78 , u3_ . is_verified AS is_verified_79 , u3_ . avatar AS avatar_80 , u3_ . locale AS locale_81 , u3_ . timezone AS timezone_82 , u3_ . status AS status_83 , u3_ . last_login_at AS last_login_at_84 , u3_ . login_count AS login_count_85 , u3_ . reset_token AS reset_token_86 , u3_ . reset_token_expires_at AS reset_token_expires_at_87 , u3_ . created_at AS created_at_88 , u3_ . updated_at AS updated_at_89 , u3_ . deleted_at AS deleted_at_90 , s4_ . id AS id_91 , s4_ . name AS name_92 , s4_ . slug AS slug_93 , s4_ . description AS description_94 , s4_ . icon AS icon_95 , s4_ . image AS image_96 , s4_ . position AS position_97 , s4_ . color AS color_98 , s4_ . seo_title AS seo_title_99 , s4_ . seo_description AS seo_description_100 , s4_ . created_at AS created_at_101 , s4_ . updated_at AS updated_at_102 , s4_ . is_active AS is_active_103 , s5_ . id AS id_104 , s5_ . name AS name_105 , s5_ . slug AS slug_106 , s5_ . description AS description_107 , s5_ . icon AS icon_108 , s5_ . image AS image_109 , s5_ . position AS position_110 , s5_ . color AS color_111 , s5_ . seo_title AS seo_title_112 , s5_ . seo_description AS seo_description_113 , s5_ . created_at AS created_at_114 , s5_ . updated_at AS updated_at_115 , s5_ . is_active AS is_active_116 FROM prestataire_profile_service p0_ INNER JOIN prestataire_profile p1_ ON p0_ . prestataire_profile_id = p1_ . id INNER JOIN service s2_ ON p0_ . service_id = s2_ . id LEFT JOIN "user" u3_ ON p1_ . user_id = u3_ . id LEFT JOIN service_category s4_ ON s2_ . category_id = s4_ . id LEFT JOIN service_category s5_ ON s4_ . parent_id = s5_ . id WHERE p1_ . profile_status = 'ACTIVE' AND p0_ . is_active = 1 AND p0_ . taux_reduction IS NOT NULL AND p0_ . taux_reduction > 0 ORDER BY p0_ . taux_reduction DESC , p0_ . id DESC ) dctrn_result ) dctrn_table ;
Copy
3
0.66 ms
SELECT DISTINCT id_0 , MIN (sclr_117 ) AS dctrn_minrownum FROM (SELECT p0_ . id AS id_0 , p0_ . is_active AS is_active_1 , p0_ . title AS title_2 , p0_ . short_description AS short_description_3 , p0_ . description AS description_4 , p0_ . pricing_type AS pricing_type_5 , p0_ . price_from AS price_from_6 , p0_ . price_to AS price_to_7 , p0_ . price_unit AS price_unit_8 , p0_ . additional_info AS additional_info_9 , p0_ . position AS position_10 , p0_ . prix_catalogue AS prix_catalogue_11 , p0_ . taux_reduction AS taux_reduction_12 , p0_ . promotion_created_at AS promotion_created_at_13 , p0_ . created_at AS created_at_14 , p0_ . updated_at AS updated_at_15 , p0_ . slug AS slug_16 , p1_ . id AS id_17 , p1_ . company_name AS company_name_18 , p1_ . slug AS slug_19 , p1_ . legal_name AS legal_name_20 , p1_ . structure_type AS structure_type_21 , p1_ . siren AS siren_22 , p1_ . siret AS siret_23 , p1_ . vat_number AS vat_number_24 , p1_ . address AS address_25 , p1_ . address_complement AS address_complement_26 , p1_ . postal_code AS postal_code_27 , p1_ . city AS city_28 , p1_ . country AS country_29 , p1_ . latitude AS latitude_30 , p1_ . longitude AS longitude_31 , p1_ . geohash AS geohash_32 , p1_ . phone_public AS phone_public_33 , p1_ . phone_private AS phone_private_34 , p1_ . website AS website_35 , p1_ . facebook_url AS facebook_url_36 , p1_ . instagram_url AS instagram_url_37 , p1_ . linkedin_url AS linkedin_url_38 , p1_ . short_description AS short_description_39 , p1_ . long_description AS long_description_40 , p1_ . logo AS logo_41 , p1_ . cover_image AS cover_image_42 , p1_ . profile_status AS profile_status_43 , p1_ . verification_status AS verification_status_44 , p1_ . completion_score AS completion_score_45 , p1_ . average_rating AS average_rating_46 , p1_ . reviews_count AS reviews_count_47 , p1_ . response_time_minutes AS response_time_minutes_48 , p1_ . is_featured AS is_featured_49 , p1_ . featured_until AS featured_until_50 , p1_ . search_visibility AS search_visibility_51 , p1_ . verified_at AS verified_at_52 , p1_ . created_at AS created_at_53 , p1_ . updated_at AS updated_at_54 , p1_ . deleted_at AS deleted_at_55 , p1_ . description AS description_56 , p1_ . metier AS metier_57 , p1_ . experience AS experience_58 , s2_ . id AS id_59 , s2_ . name AS name_60 , s2_ . slug AS slug_61 , s2_ . description AS description_62 , s2_ . icon AS icon_63 , s2_ . average_price_min AS average_price_min_64 , s2_ . average_price_max AS average_price_max_65 , s2_ . position AS position_66 , s2_ . is_active AS is_active_67 , s2_ . created_at AS created_at_68 , s2_ . updated_at AS updated_at_69 , u3_ . id AS id_70 , u3_ . email AS email_71 , u3_ . roles AS roles_72 , u3_ . password AS password_73 , u3_ . first_name AS first_name_74 , u3_ . last_name AS last_name_75 , u3_ . phone_number AS phone_number_76 , u3_ . phone_verified_at AS phone_verified_at_77 , u3_ . email_verified_at AS email_verified_at_78 , u3_ . is_verified AS is_verified_79 , u3_ . avatar AS avatar_80 , u3_ . locale AS locale_81 , u3_ . timezone AS timezone_82 , u3_ . status AS status_83 , u3_ . last_login_at AS last_login_at_84 , u3_ . login_count AS login_count_85 , u3_ . reset_token AS reset_token_86 , u3_ . reset_token_expires_at AS reset_token_expires_at_87 , u3_ . created_at AS created_at_88 , u3_ . updated_at AS updated_at_89 , u3_ . deleted_at AS deleted_at_90 , s4_ . id AS id_91 , s4_ . name AS name_92 , s4_ . slug AS slug_93 , s4_ . description AS description_94 , s4_ . icon AS icon_95 , s4_ . image AS image_96 , s4_ . position AS position_97 , s4_ . color AS color_98 , s4_ . seo_title AS seo_title_99 , s4_ . seo_description AS seo_description_100 , s4_ . created_at AS created_at_101 , s4_ . updated_at AS updated_at_102 , s4_ . is_active AS is_active_103 , s5_ . id AS id_104 , s5_ . name AS name_105 , s5_ . slug AS slug_106 , s5_ . description AS description_107 , s5_ . icon AS icon_108 , s5_ . image AS image_109 , s5_ . position AS position_110 , s5_ . color AS color_111 , s5_ . seo_title AS seo_title_112 , s5_ . seo_description AS seo_description_113 , s5_ . created_at AS created_at_114 , s5_ . updated_at AS updated_at_115 , s5_ . is_active AS is_active_116 , ROW_NUMBER () OVER (ORDER BY p0_ . taux_reduction DESC , p0_ . id DESC ) AS sclr_117 FROM prestataire_profile_service p0_ INNER JOIN prestataire_profile p1_ ON p0_ . prestataire_profile_id = p1_ . id INNER JOIN service s2_ ON p0_ . service_id = s2_ . id LEFT JOIN "user" u3_ ON p1_ . user_id = u3_ . id LEFT JOIN service_category s4_ ON s2_ . category_id = s4_ . id LEFT JOIN service_category s5_ ON s4_ . parent_id = s5_ . id WHERE p1_ . profile_status = ? AND p0_ . is_active = ? AND p0_ . taux_reduction IS NOT NULL AND p0_ . taux_reduction > 0 ) dctrn_result GROUP BY id_0 ORDER BY dctrn_minrownum ASC LIMIT 9
Parameters :
[
"ACTIVE "
1
]
SELECT
DISTINCT id_0 ,
MIN (sclr_117 ) AS dctrn_minrownum
FROM
(
SELECT
p0_ . id AS id_0 ,
p0_ . is_active AS is_active_1 ,
p0_ . title AS title_2 ,
p0_ . short_description AS short_description_3 ,
p0_ . description AS description_4 ,
p0_ . pricing_type AS pricing_type_5 ,
p0_ . price_from AS price_from_6 ,
p0_ . price_to AS price_to_7 ,
p0_ . price_unit AS price_unit_8 ,
p0_ . additional_info AS additional_info_9 ,
p0_ . position AS position_10 ,
p0_ . prix_catalogue AS prix_catalogue_11 ,
p0_ . taux_reduction AS taux_reduction_12 ,
p0_ . promotion_created_at AS promotion_created_at_13 ,
p0_ . created_at AS created_at_14 ,
p0_ . updated_at AS updated_at_15 ,
p0_ . slug AS slug_16 ,
p1_ . id AS id_17 ,
p1_ . company_name AS company_name_18 ,
p1_ . slug AS slug_19 ,
p1_ . legal_name AS legal_name_20 ,
p1_ . structure_type AS structure_type_21 ,
p1_ . siren AS siren_22 ,
p1_ . siret AS siret_23 ,
p1_ . vat_number AS vat_number_24 ,
p1_ . address AS address_25 ,
p1_ . address_complement AS address_complement_26 ,
p1_ . postal_code AS postal_code_27 ,
p1_ . city AS city_28 ,
p1_ . country AS country_29 ,
p1_ . latitude AS latitude_30 ,
p1_ . longitude AS longitude_31 ,
p1_ . geohash AS geohash_32 ,
p1_ . phone_public AS phone_public_33 ,
p1_ . phone_private AS phone_private_34 ,
p1_ . website AS website_35 ,
p1_ . facebook_url AS facebook_url_36 ,
p1_ . instagram_url AS instagram_url_37 ,
p1_ . linkedin_url AS linkedin_url_38 ,
p1_ . short_description AS short_description_39 ,
p1_ . long_description AS long_description_40 ,
p1_ . logo AS logo_41 ,
p1_ . cover_image AS cover_image_42 ,
p1_ . profile_status AS profile_status_43 ,
p1_ . verification_status AS verification_status_44 ,
p1_ . completion_score AS completion_score_45 ,
p1_ . average_rating AS average_rating_46 ,
p1_ . reviews_count AS reviews_count_47 ,
p1_ . response_time_minutes AS response_time_minutes_48 ,
p1_ . is_featured AS is_featured_49 ,
p1_ . featured_until AS featured_until_50 ,
p1_ . search_visibility AS search_visibility_51 ,
p1_ . verified_at AS verified_at_52 ,
p1_ . created_at AS created_at_53 ,
p1_ . updated_at AS updated_at_54 ,
p1_ . deleted_at AS deleted_at_55 ,
p1_ . description AS description_56 ,
p1_ . metier AS metier_57 ,
p1_ . experience AS experience_58 ,
s2_ . id AS id_59 ,
s2_ . name AS name_60 ,
s2_ . slug AS slug_61 ,
s2_ . description AS description_62 ,
s2_ . icon AS icon_63 ,
s2_ . average_price_min AS average_price_min_64 ,
s2_ . average_price_max AS average_price_max_65 ,
s2_ . position AS position_66 ,
s2_ . is_active AS is_active_67 ,
s2_ . created_at AS created_at_68 ,
s2_ . updated_at AS updated_at_69 ,
u3_ . id AS id_70 ,
u3_ . email AS email_71 ,
u3_ . roles AS roles_72 ,
u3_ . password AS password_73 ,
u3_ . first_name AS first_name_74 ,
u3_ . last_name AS last_name_75 ,
u3_ . phone_number AS phone_number_76 ,
u3_ . phone_verified_at AS phone_verified_at_77 ,
u3_ . email_verified_at AS email_verified_at_78 ,
u3_ . is_verified AS is_verified_79 ,
u3_ . avatar AS avatar_80 ,
u3_ . locale AS locale_81 ,
u3_ . timezone AS timezone_82 ,
u3_ . status AS status_83 ,
u3_ . last_login_at AS last_login_at_84 ,
u3_ . login_count AS login_count_85 ,
u3_ . reset_token AS reset_token_86 ,
u3_ . reset_token_expires_at AS reset_token_expires_at_87 ,
u3_ . created_at AS created_at_88 ,
u3_ . updated_at AS updated_at_89 ,
u3_ . deleted_at AS deleted_at_90 ,
s4_ . id AS id_91 ,
s4_ . name AS name_92 ,
s4_ . slug AS slug_93 ,
s4_ . description AS description_94 ,
s4_ . icon AS icon_95 ,
s4_ . image AS image_96 ,
s4_ . position AS position_97 ,
s4_ . color AS color_98 ,
s4_ . seo_title AS seo_title_99 ,
s4_ . seo_description AS seo_description_100 ,
s4_ . created_at AS created_at_101 ,
s4_ . updated_at AS updated_at_102 ,
s4_ . is_active AS is_active_103 ,
s5_ . id AS id_104 ,
s5_ . name AS name_105 ,
s5_ . slug AS slug_106 ,
s5_ . description AS description_107 ,
s5_ . icon AS icon_108 ,
s5_ . image AS image_109 ,
s5_ . position AS position_110 ,
s5_ . color AS color_111 ,
s5_ . seo_title AS seo_title_112 ,
s5_ . seo_description AS seo_description_113 ,
s5_ . created_at AS created_at_114 ,
s5_ . updated_at AS updated_at_115 ,
s5_ . is_active AS is_active_116 ,
ROW_NUMBER () OVER (
ORDER BY
p0_ . taux_reduction DESC ,
p0_ . id DESC
) AS sclr_117
FROM
prestataire_profile_service p0_
INNER JOIN prestataire_profile p1_ ON p0_ . prestataire_profile_id = p1_ . id
INNER JOIN service s2_ ON p0_ . service_id = s2_ . id
LEFT JOIN "user" u3_ ON p1_ . user_id = u3_ . id
LEFT JOIN service_category s4_ ON s2_ . category_id = s4_ . id
LEFT JOIN service_category s5_ ON s4_ . parent_id = s5_ . id
WHERE
p1_ . profile_status = ?
AND p0_ . is_active = ?
AND p0_ . taux_reduction IS NOT NULL
AND p0_ . taux_reduction > 0
) dctrn_result
GROUP BY
id_0
ORDER BY
dctrn_minrownum ASC
LIMIT
9
Copy
SELECT DISTINCT id_0 , MIN (sclr_117 ) AS dctrn_minrownum FROM (SELECT p0_ . id AS id_0 , p0_ . is_active AS is_active_1 , p0_ . title AS title_2 , p0_ . short_description AS short_description_3 , p0_ . description AS description_4 , p0_ . pricing_type AS pricing_type_5 , p0_ . price_from AS price_from_6 , p0_ . price_to AS price_to_7 , p0_ . price_unit AS price_unit_8 , p0_ . additional_info AS additional_info_9 , p0_ . position AS position_10 , p0_ . prix_catalogue AS prix_catalogue_11 , p0_ . taux_reduction AS taux_reduction_12 , p0_ . promotion_created_at AS promotion_created_at_13 , p0_ . created_at AS created_at_14 , p0_ . updated_at AS updated_at_15 , p0_ . slug AS slug_16 , p1_ . id AS id_17 , p1_ . company_name AS company_name_18 , p1_ . slug AS slug_19 , p1_ . legal_name AS legal_name_20 , p1_ . structure_type AS structure_type_21 , p1_ . siren AS siren_22 , p1_ . siret AS siret_23 , p1_ . vat_number AS vat_number_24 , p1_ . address AS address_25 , p1_ . address_complement AS address_complement_26 , p1_ . postal_code AS postal_code_27 , p1_ . city AS city_28 , p1_ . country AS country_29 , p1_ . latitude AS latitude_30 , p1_ . longitude AS longitude_31 , p1_ . geohash AS geohash_32 , p1_ . phone_public AS phone_public_33 , p1_ . phone_private AS phone_private_34 , p1_ . website AS website_35 , p1_ . facebook_url AS facebook_url_36 , p1_ . instagram_url AS instagram_url_37 , p1_ . linkedin_url AS linkedin_url_38 , p1_ . short_description AS short_description_39 , p1_ . long_description AS long_description_40 , p1_ . logo AS logo_41 , p1_ . cover_image AS cover_image_42 , p1_ . profile_status AS profile_status_43 , p1_ . verification_status AS verification_status_44 , p1_ . completion_score AS completion_score_45 , p1_ . average_rating AS average_rating_46 , p1_ . reviews_count AS reviews_count_47 , p1_ . response_time_minutes AS response_time_minutes_48 , p1_ . is_featured AS is_featured_49 , p1_ . featured_until AS featured_until_50 , p1_ . search_visibility AS search_visibility_51 , p1_ . verified_at AS verified_at_52 , p1_ . created_at AS created_at_53 , p1_ . updated_at AS updated_at_54 , p1_ . deleted_at AS deleted_at_55 , p1_ . description AS description_56 , p1_ . metier AS metier_57 , p1_ . experience AS experience_58 , s2_ . id AS id_59 , s2_ . name AS name_60 , s2_ . slug AS slug_61 , s2_ . description AS description_62 , s2_ . icon AS icon_63 , s2_ . average_price_min AS average_price_min_64 , s2_ . average_price_max AS average_price_max_65 , s2_ . position AS position_66 , s2_ . is_active AS is_active_67 , s2_ . created_at AS created_at_68 , s2_ . updated_at AS updated_at_69 , u3_ . id AS id_70 , u3_ . email AS email_71 , u3_ . roles AS roles_72 , u3_ . password AS password_73 , u3_ . first_name AS first_name_74 , u3_ . last_name AS last_name_75 , u3_ . phone_number AS phone_number_76 , u3_ . phone_verified_at AS phone_verified_at_77 , u3_ . email_verified_at AS email_verified_at_78 , u3_ . is_verified AS is_verified_79 , u3_ . avatar AS avatar_80 , u3_ . locale AS locale_81 , u3_ . timezone AS timezone_82 , u3_ . status AS status_83 , u3_ . last_login_at AS last_login_at_84 , u3_ . login_count AS login_count_85 , u3_ . reset_token AS reset_token_86 , u3_ . reset_token_expires_at AS reset_token_expires_at_87 , u3_ . created_at AS created_at_88 , u3_ . updated_at AS updated_at_89 , u3_ . deleted_at AS deleted_at_90 , s4_ . id AS id_91 , s4_ . name AS name_92 , s4_ . slug AS slug_93 , s4_ . description AS description_94 , s4_ . icon AS icon_95 , s4_ . image AS image_96 , s4_ . position AS position_97 , s4_ . color AS color_98 , s4_ . seo_title AS seo_title_99 , s4_ . seo_description AS seo_description_100 , s4_ . created_at AS created_at_101 , s4_ . updated_at AS updated_at_102 , s4_ . is_active AS is_active_103 , s5_ . id AS id_104 , s5_ . name AS name_105 , s5_ . slug AS slug_106 , s5_ . description AS description_107 , s5_ . icon AS icon_108 , s5_ . image AS image_109 , s5_ . position AS position_110 , s5_ . color AS color_111 , s5_ . seo_title AS seo_title_112 , s5_ . seo_description AS seo_description_113 , s5_ . created_at AS created_at_114 , s5_ . updated_at AS updated_at_115 , s5_ . is_active AS is_active_116 , ROW_NUMBER () OVER (ORDER BY p0_ . taux_reduction DESC , p0_ . id DESC ) AS sclr_117 FROM prestataire_profile_service p0_ INNER JOIN prestataire_profile p1_ ON p0_ . prestataire_profile_id = p1_ . id INNER JOIN service s2_ ON p0_ . service_id = s2_ . id LEFT JOIN "user" u3_ ON p1_ . user_id = u3_ . id LEFT JOIN service_category s4_ ON s2_ . category_id = s4_ . id LEFT JOIN service_category s5_ ON s4_ . parent_id = s5_ . id WHERE p1_ . profile_status = 'ACTIVE' AND p0_ . is_active = 1 AND p0_ . taux_reduction IS NOT NULL AND p0_ . taux_reduction > 0 ) dctrn_result GROUP BY id_0 ORDER BY dctrn_minrownum ASC LIMIT 9 ;
Copy
4
0.21 ms
SELECT s0_ . id AS id_0 , s0_ . name AS name_1 , s0_ . slug AS slug_2 , s0_ . description AS description_3 , s0_ . icon AS icon_4 , s0_ . image AS image_5 , s0_ . position AS position_6 , s0_ . color AS color_7 , s0_ . seo_title AS seo_title_8 , s0_ . seo_description AS seo_description_9 , s0_ . created_at AS created_at_10 , s0_ . updated_at AS updated_at_11 , s0_ . is_active AS is_active_12 , s1_ . id AS id_13 , s1_ . name AS name_14 , s1_ . slug AS slug_15 , s1_ . description AS description_16 , s1_ . icon AS icon_17 , s1_ . image AS image_18 , s1_ . position AS position_19 , s1_ . color AS color_20 , s1_ . seo_title AS seo_title_21 , s1_ . seo_description AS seo_description_22 , s1_ . created_at AS created_at_23 , s1_ . updated_at AS updated_at_24 , s1_ . is_active AS is_active_25 , s0_ . parent_id AS parent_id_26 , s1_ . parent_id AS parent_id_27 FROM service_category s0_ LEFT JOIN service_category s1_ ON s0_ . id = s1_ . parent_id WHERE s0_ . parent_id IS NULL AND s0_ . is_active = ? AND (s1_ . id IS NULL OR s1_ . is_active = ? ) ORDER BY s0_ . position ASC , s1_ . position ASC
SELECT s0_ . id AS id_0 , s0_ . name AS name_1 , s0_ . slug AS slug_2 , s0_ . description AS description_3 , s0_ . icon AS icon_4 , s0_ . image AS image_5 , s0_ . position AS position_6 , s0_ . color AS color_7 , s0_ . seo_title AS seo_title_8 , s0_ . seo_description AS seo_description_9 , s0_ . created_at AS created_at_10 , s0_ . updated_at AS updated_at_11 , s0_ . is_active AS is_active_12 , s1_ . id AS id_13 , s1_ . name AS name_14 , s1_ . slug AS slug_15 , s1_ . description AS description_16 , s1_ . icon AS icon_17 , s1_ . image AS image_18 , s1_ . position AS position_19 , s1_ . color AS color_20 , s1_ . seo_title AS seo_title_21 , s1_ . seo_description AS seo_description_22 , s1_ . created_at AS created_at_23 , s1_ . updated_at AS updated_at_24 , s1_ . is_active AS is_active_25 , s0_ . parent_id AS parent_id_26 , s1_ . parent_id AS parent_id_27 FROM service_category s0_ LEFT JOIN service_category s1_ ON s0_ . id = s1_ . parent_id WHERE s0_ . parent_id IS NULL AND s0_ . is_active = 1 AND (s1_ . id IS NULL OR s1_ . is_active = 1 ) ORDER BY s0_ . position ASC , s1_ . position ASC ;
Copy