|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Hi,
How can I report the fraction of certain item in SQL? For example: select count(*)/sum(count (*)) from... group by... But it is not allowed of multifuntion in oracle like above. Is there any other way to do this? Thank you very much for your kind help! |
|
#2
|
||||
|
||||
|
which item?
![]() something like this: Code:
select sum(case when columnX='foo' then 1 else 0 end)
/ count(*) as fraction
from yourtable
rudy |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > report fraction in sql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|