SELECT MAX(crash_year) AS crash_year, COUNT(crash_year) AS COUNT
FROM nyccrash
GROUP BY crash_year
ORDER BY COUNT(crash_year) DESC;
该语句将返回 20 年的整个范围。但是我如何只检索第一行?
+------------+-------+
| crash_year | count |
+------------+-------+
| 1999 | 862 |
| 1990 | 847 |
| 1992 | 812 |
| 1991 | 810 |
| 1993 | 806 |
| 2000 | 803 |
| 1994 | 782 |
| 1989 | 763 |
| 2001 | 729 |
| 1995 | 698 |
| 1997 | 672 |
| 1996 | 671 |
| 1998 | 665 |
| 2002 | 497 |
| 2003 | 419 |
| 2006 | 384 |
| 2004 | 377 |
| 2007 | 364 |
| 2005 | 363 |
+------------+-------+