oracle sql case
oracle sql case or case statement in sql
1 2 3 4 5 6 7 8 9 |
SELECT a.emplid, case when a.ts_percentage >= 85 then 'G' else case when a.ts_ranking1 >= '3' and a.ts_ranking2 >= '3' then 'G' else case when (a.ts_ranking1 >= '3' and a.ts_percentage2 >= 85) then 'G' else case when (a.ts_ranking2 >= '3' and a.ts_percentage1 >= 85) then 'G' else 'T' end end end end end end type from ps_ts_score a |