Skip to content

Instantly share code, notes, and snippets.

View yar-malik's full-sized avatar
:octocat:
Focusing

Yar Malik yar-malik

:octocat:
Focusing
View GitHub Profile
select
CASE
WHEN status IN ('OPEN','ACTIVE') then '1open'
WHEN status IN ('SUBMITTED','IN_VALIDATION') or (statusid IN (14,15,30) and scoringmodel is null) then '11inprocess'
WHEN statusid IN (21,27) THEN '2autoreject'
WHEN statusid IN (24,25,26,28) THEN '3premodelreject'
WHEN statusid IN (23) THEN '4modelreject'
WHEN statusid IN (29) THEN '5cbreject'
WHEN scoringmodel is not null and status IN ('REVIEW','REVIEW_DOCUMENTS','MISSING_DOCUMENTS','ACCEPTED','ACCEPTED_LIMIT','WAITING_PAYOUT','PRECONFIRMED') THEN '6acceptedWaiting'