SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     TRUNC (B.FECHA_CAPTURA)        AS RECEPCION_DCL,
  3.     TRUNC (CREATE_DATE)            AS RECEPCION_CSC,
  4.     DEC_DICT                       AS DEC_DICT,
  5.     NVL (ID_DECENA, ID_DECENA_EXT) AS DEC_CSC,
  6.     COUNT (*)                      AS AFORO,
  7.     SUM (AMOUNT_REAL)              AS IMPORTE_CSC,
  8.     SUM (AMOUNT_CHARGED)           AS IMPORTE_DCL
  9. FROM AMS_TRANSACTION A
  10. LEFT OUTER JOIN TBL_DCL_CRUCES B ON ID_CRUCES = IDCRUCES
  11. WHERE     CREATE_DATE > :FECHA - (1 / (24 * 3600))
  12.     AND CREATE_DATE < :FECHA + 1
  13.     AND (NVL(ID_DECENA, ID_DECENA_EXT) = '164' OR NVL(ID_DECENA, ID_DECENA_EXT) IN ('193','191'))
  14.     AND ID_CONCESSIONAIRE > 0        
  15. GROUP BY
  16.     TRUNC (B.FECHA_CAPTURA),
  17.     TRUNC (CREATE_DATE),
  18.     DEC_DICT,
  19.     NVL (ID_DECENA, ID_DECENA_EXT)
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