![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 22 Aug 2008 @ 13:27:13 GMT
Create an alias as in this example. You have to change your group by as well
sel foo,
100 * (curr_bal - cl_amt) / cl_amt as my_calc,
case when my_calc <= 10
then '(2) <= 10%'
else '(6) > 25%' end OL_Pct,
count(1) Number
from Table
Group by foo, cur_bal, cl_amt
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||