top_n function

Select top (or bottom) n rows (by value)