SHARE
TWEET

Untitled

a guest Dec 9th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     /*+ parallel (16) */
  3.     TRUNC(ordercreationdate, 'mi') fecha,
  4.     'Ordenes Creadas' metrica,
  5.     oh.requesttype,
  6.     OH.STATUS,
  7.     OH.MILESTONE,
  8.     JSON_VALUE(LTRIM(CDRO_CH.DATA, '$JSON'),
  9.     '$.orderCommercialChannel') CHANNEL,
  10.     COUNT(1) total
  11. FROM
  12.     eoc.OM_ORDER_HEADER_POSTPAID OH,
  13.     eoc.CWORDERINSTANCE oi,
  14.     EOC.cwt_do_relatedobjects CDRO_CH
  15. WHERE
  16.     oh.ordercreationdate >= CAST(:sql_last_value AS DATE)
  17.     AND oh.REQUESTNUMBER = oi.ORDERNUM
  18.     AND oi.ORDERROLE = 'Q'
  19.     AND oh.cworderid = cdro_ch.orderid
  20.     AND CDRO_CH.NAMESEARCHKEY = 'RelatedEntity/Channel'
  21. GROUP BY
  22.     TRUNC(ordercreationdate, 'mi'),
  23.     oh.requesttype,
  24.     OH.STATUS,
  25.     OH.MILESTONE,
  26.     JSON_VALUE(LTRIM(CDRO_CH.DATA, '$JSON'),
  27.     '$.orderCommercialChannel')
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
 
Top