|
select decode(emm_freq,0,1,emm_freq) *
decode(rec_freq,0,1,rec_freq) value
from (select count(emission_freq) emm_freq,count(reception_freq) rec_freq from test where station='STAT2')
VALUE
-------- 3 I am selecting from a view which as you see has the
counts of both the columns
I am using decode to replace '0' with '1' ,
without this step the answer would be improper
for example
for stat2 the inner view will fetch values 3 and 0
when multiplied will give 0
to overcome this I replace 0 with 1
Hope this serves the purpose
coz
I am a novice Oracle Certifiable DBBS
|
- Simple SQL Query Question ALEMU Abiy
- RE: Simple SQL Query Question Amar Kumar Padhi
- Re: Simple SQL Query Question novicedba
- Re: Simple SQL Query Question novicedba
- RE: Simple SQL Query Question ALEMU Abiy
- RE: Simple SQL Query Question ALEMU Abiy
- RE: Simple SQL Query Question Amar Kumar Padhi
- RE: Simple SQL Query Question Harsh Agrawal
- RE: Simple SQL Query Question ALEMU Abiy
- RE: Simple SQL Query Question novicedba
- RE: Simple SQL Query Question ALEMU Abiy
- RE: Simple SQL Query Question ALEMU Abiy
