Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding lowest price and single lowest price

Status
Not open for further replies.

florens

IS-IT--Management
Nov 13, 2002
50
NL
Hi,

I have a table with articles build up like this:

article_no price
1 15
2 3
3 9
4 10
5 9
6 20
7 9
8 12

and I want to write a query to get the article with the lowest price and the article with the single lowest price. so the result should be:
2 3
3 9
5 9
7 9

I've tried a lot of functions and used sub-queries, but nothing seems to work. Does anybody know a solution?

thanks
 
SELECT * FROM testarticle
WHERE Price < 10
ORDER BY Price;

**** Note if your price field in in INT

Prakash
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top