sql - SELECT columns OVER (PARTITION BY column) -


table being queried (tablea)

suppose want retrieve swimmer , time @ 75th percentile each day.

this trying do:

select tablea.date, tablea.swimmer, tablea.time                 on (partition tablea.date)                 tablea                 rank = ceil(0.75 * num_of_swimmers); 

but errors @ on statement.

what's best way data need?

thanks!

your error on clause of windowing function requires order clause.

but assuming num_swimmers , why not return

select    date, swimmer, time tablea  rank = ceil(0.75 * num_of_swimmers) 

?

the clause ensure rows returned 75th percentile given day


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -