Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted as SQL by registered user vvillacorta ( 2 years 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