我有下表:
table_a
id | charge
1 | 95
1 | 1
2 | 25
我想从每个 id 中选择最低费用并确定它是否小于...例如 SELECT id,charge FROM table_a WHERE MIN(charge) > 10 GROUP BY id
Results:
None
SELECT id,charge FROM table_a WHERE MIN(charge) < 10 GROUP BY id
Results:
id | charge
1 | 1