-
Simple query question
Ok I have a table called SaleProperty which includes house prices
Now I want to output the property with the highest value and the lowest value so i came up with:
SELECT *
FROM SaleProperty
WHERE price = (SELECT MIN(price) FROM SaleProperty)
OR
price = (SELECT MAX(price) FROM SaleProperty);
Is there a better way of doing this? i.e. with one sub query instead of two?
Thanks.
Note: this is in MS Access XP 2002
Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.
http://www.webamoeba.co.uk
-
How about:
select min(price) as MinPrice, max(price) as MaxPrice
from SaleProperty
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks