need SQL select to retrieve the MAX 10 values??

I am rather a newbie...but i was wonder what select statement i can use to retreieve the 10 top values from a table...for instance the 10 books that sell the most....

Select title, author, price, noofsales where noofsales between ????

if use between i need 2 values the MAX(noofsales) that would give me one value for the between..how do i find the 10 value?

or is there another select one could use?



Comments

  • : I am rather a newbie...but i was wonder what select statement i can use to retreieve the 10 top values from a table...for instance the 10 books that sell the most....
    :
    : Select title, author, price, noofsales where noofsales between ????
    :
    : if use between i need 2 values the MAX(noofsales) that would give me one value for the between..how do i find the 10 value?
    :
    : or is there another select one could use?
    :
    :
    :
    :
    select top 10 title, author, price, noofsales
    from tbl
    order by noofsales desc
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion