我有表billa其中有列:currency,amount和billed_at。從組的最大值中選擇最小值
我想取從各貨幣
抓取最大billed_at每種貨幣的billed_at的最大值最小值billed_at可以與此查詢
SELECT MAX(billed_at), currency FROM bills GROUP BY currency
例如它返回2行
完成2013-12-16 13:31:18 UTC,「EUR」
2013-12-02 14:57:00 U TC,「USD」
然後我需要從這個結果中獲取最小billed_at。我怎樣才能做到這一點?
在此先感謝!
'選擇billed_at,貨幣從賬單以便通過billed_at限制1' –