SHARE
TWEET

Untitled

a guest Jun 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     MIN(id) AS vMIN,
  3.     MAX(id) AS vMAX
  4. FROM (
  5. SELECT
  6.     id
  7.     , COUNT(id) over (ORDER BY id) DIV 500000 AS rn
  8. FROM (
  9.         SELECT products_attributes_id AS id
  10.         FROM dwh_shipment_products_from_categories
  11.         WHERE last_date_update_p >= '2019-06-01'
  12.         UNION
  13.         SELECT products_attributes_id AS id
  14.         FROM dwh_shipment_products_from_categories
  15.         WHERE last_date_update_pp >= '2019-06-01'
  16.         UNION
  17.         SELECT products_attributes_id AS id
  18.         FROM dwh_shipment_products_from_categories
  19.         WHERE last_date_update_c >= '2019-06-01'
  20.         ) AS t
  21.         ) AS t2
  22. GROUP BY rn
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top