|
|
Re: Count no of record [message #615678 is a reply to message #615663] |
Fri, 06 June 2014 15:52 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
select
grade,
decode(grade, 'E', '33-39',
'D', '40-49',
'C', '50-59',
'B', '60-69',
'A', '70-79',
'A+','80% and above'
) pct,
count(*) no_of_students
from your_table
group by
grade,
decode(grade, 'E', '33-39',
'D', '40-49',
'C', '50-59',
'B', '60-69',
'A', '70-79',
'A+','80% and above'
);
|
|
|
|
|
|
Re: Count no of record [message #615757 is a reply to message #615750] |
Mon, 09 June 2014 01:28 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Do you need a formula column? I prefer putting everything into a query itself, and use formula columns only when necessary.
Anyway: formula column returns a single value, depending on certain parameters it accepts. I don't know which values you want to pass to it (and use them in a WHERE clause), but you might.
|
|
|