我昨晚学习了sql MIN()的用法,现在我明白了它是如何工作的。然而,我想知道,我该如何运行
SELECT MIN(card_price)
FROM card_lookup_values 并显示每张卡的最低“价格”。许多卡片在card_price栏中有5-9个价格。我想我要找的是:
card_id card_price
0001 2
0002 99
0003 22.3发布于 2011-05-20 21:22:20
你需要一个group by card_name。
考虑阅读这篇关于聚合函数的教程:
http://www.postgresql.org/docs/9.0/static/tutorial-agg.html
https://stackoverflow.com/questions/6072468
复制相似问题