mysql> select name,a.shop_id,max(a.rate) as b from shop,coupon as a where shop.s
hop_id=a.shop_id group by a.shop_id order by b desc limit 3;
+------+---------+------+
| name | shop_id | b |
+------+---------+------+
| aa | 1 | 120 |
| dd | 4 | 100 |
| cc | 3 | 94 |
+------+---------+------+
3 rows in set (0.01 sec)
hop_id=a.shop_id group by a.shop_id order by b desc limit 3;
+------+---------+------+
| name | shop_id | b |
+------+---------+------+
| aa | 1 | 120 |
| dd | 4 | 100 |
| cc | 3 | 94 |
+------+---------+------+
3 rows in set (0.01 sec)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货