表记录:
region_id | region_name |
1 | China |
2 | China |
3 | Japan |
4 | USA |
5 | USA |
取出无重复的region_name
SELECT * , count( DISTINCT region_name )
FROM region
GROUP BY region_name
*仅在mysql下测试过。
表记录:
region_id | region_name |
1 | China |
2 | China |
3 | Japan |
4 | USA |
5 | USA |
取出无重复的region_name
SELECT * , count( DISTINCT region_name )
FROM region
GROUP BY region_name
*仅在mysql下测试过。