finding maximum and minimum in a column

nmh
Go4Expert Member
29Apr2008,12:58   #1
nmh's Avatar
In a table called Item there are several items. Item with same can be there such as chocolate, toffee but they have a different Item code. How can I find the Same item with maximum and minimum values.?(That is chocolate with with maximum and minimum prize).

I thank you in advanced.
Go4Expert Founder
29Apr2008,17:12   #2
shabbir's Avatar
Here they come

Code:
Select * from chocolate where price = (Select max(price) from chocolate)
Code:
Select * from chocolate where price = (Select min(price) from chocolate)
nmh
Go4Expert Member
29Apr2008,19:17   #3
nmh's Avatar
shabbir
Thanks a lot
cheers