Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> FW: how to write this sql query
Yes, It is working. Thanks!
Guang
> -----Original Message-----
Guang,
Add MAX(score) over() to your query and that should do it, so:
select DISTINCT QUERYID,
FIRST_VALUE(SUBJID) OVER (PARTITION BY QUERYID ORDER BY score DESC),
MAX(score) OVER()
from blastresults where QUERYID=62;
![]() |
![]() |