I have a dataset as per:
+----+---------------+-------+-------------+---------------------+
| id | ip | port | point_count | create_time |
+----+---------------+-------+-------------+---------------------+
| 1 | 192.168.20.28 | 10000 | 0 | 2013-03-29 14:29:14 |
| 2 | 0.0.0.0 | 10000 | 0 | 2013-03-29 14:29:32 |
| 3 | 0.0.0.1 | 11111 | 2 | 2013-03-29 14:29:38 |
| 4 | 0.0.0.5 | 11112 | 3 | 2013-03-29 14:29:44 |
+----+---------------+-------+-------------+---------------------+
4 rows in set (0.00 sec)
Now, I use mysql's MIN() function to fetch records as per:
mysql> SELECT s.id, s.ip, s.port, MIN(s.point_count) FROM origin_server s;
+----+---------------+-------+--------------------+
| id | ip | port | MIN(s.point_count) |
+----+---------------+-------+--------------------+
| 1 | 192.168.20.28 | 10000 | 0 |
+----+---------------+-------+--------------------+
1 row in set (0.00 sec)
Obviously, there are two rows have the same value for column point_count , but it returned me only one record. I just wanna confirm if this situation is correct. Thanks in advance :)