Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as SQL by registered user vvillacorta ( 8 months ago )
SELECT COUNT(*)  --select *
FROM  ODS.MM_GESCOM_UNIVERSO_MERCADO_TOTAL_BPE
WHERE CASE WHEN GRUPO_MERCADO='MERCADO - ULTIMO MES BPE' THEN 1 ELSE 0 END +
      CASE WHEN GRUPO_MERCADO<>'.' AND BANCA='MICRO' THEN 1 ELSE 0 END +
        CASE WHEN GRUPO_MERCADO='MERCADO RESCATE - ULTIMOS 12 MESES' AND BANCA IN ('BPE','BE') THEN 1 ELSE 0 END +
        CASE WHEN GRUPO_MERCADO_RESCATE<>'.' THEN 1 ELSE 0 END +
       CASE WHEN GRUPO_FN<>'.' AND TIPO_CONTRIBUYENTE IN ('PJ') THEN 1 ELSE 0 END +
        CASE WHEN GRUPO_IZIPAY<>'.' OR  GRUPO_LANDING<>'.' OR GRUPO_ECO <>'.' OR GRUPO_CN<>'.' OR GRUPO_FACT<>'.' THEN 1 ELSE 0 END >=1
AND TIPO_CONTRIBUYENTE IN ('PJ','PN - CN')
AND ESTADO_CONTRIBUYENTE='ACTIVO'

 

Revise this Paste

Your Name: Code Language: