I read up last night on using the sql MIN() and I underst开发者_如何学编程and how it works now. However, I was wondering, how do I run
SELECT MIN(card_price)
FROM card_lookup_values
and display the lowest "price" for each individual card. A lot of the cards have 5-9 prices in the card_price column. I guess I was looking for:
card_id card_price
0001 2
0002 99
0003 22.3
You need a group by card_name
.
Consider reading this tutorial on aggregate functions:
http://www.postgresql.org/docs/9.0/static/tutorial-agg.html
精彩评论