Advertisement
thomaskekeisen

Untitled

Aug 15th, 2020
1,437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.73 KB | None | 0 0
  1. SELECT DISTINCT l0_.created_at           AS created_at_0,
  2.                 l0_.updated_at           AS updated_at_1,
  3.                 l0_.id                   AS id_2,
  4.                 l0_.name                 AS name_3,
  5.                 l0_.slug                 AS slug_4,
  6.                 l0_.display_name         AS display_name_5,
  7.                 l0_.popular_category     AS popular_category_6,
  8.                 l0_.external_identifier  AS external_identifier_7,
  9.                 l0_.source_url           AS source_url_8,
  10.                 l0_.expire_date          AS expire_date_9,
  11.                 l0_.hidden               AS hidden_10,
  12.                 count(l1_.id)            AS sclr_11,
  13.                 l0_.parent_category_id   AS parent_category_id_12,
  14.                 l0_.top_most_category_id AS top_most_category_id_13,
  15.                 l0_.city_id              AS city_id_14,
  16.                 l0_.city_data_source_id  AS city_data_source_id_15,
  17.                 l0_.data_source_id       AS data_source_id_16
  18. FROM locamo_cd_locamo_fd_product_category l0_
  19.          INNER JOIN locamo_cd_locamo_fd_product l1_
  20.                     ON ((l1_.category_id = l0_.id OR l1_.top_most_category_id = l0_.id) AND l1_.stock > 0 AND
  21.                         l1_.parent_product_id IS NULL)
  22.          LEFT JOIN locamo_cd_locamo_lift_dealer l2_ ON l1_.locamo_lift_dealer = l2_.id
  23.          INNER JOIN locamo_city_dealer_distance l3_ ON l2_.id = l3_.dealer_id AND
  24.                                                        (l3_.city_id = 'b3414cfc-6831-11ea-bc55-0242ac130003' AND
  25.                                                         (l3_.in_city = 1 OR l3_.distance_in_meters < '40000'))
  26. WHERE l0_.parent_category_id IS NULL
  27. GROUP BY l0_.id
  28. ORDER BY l0_.name ASC
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement