mysql> select url,count(url) from access_log 
      where status=404 group by url;

+--------------------------------+------------+
| url                            | count(url) |
+--------------------------------+------------+
| /foobarbaz/                    | 2          |
| /java/java/io/Reader.class     | 1          |
| /javadoc                       | 3          |
| /javadoc/                      | 6          |
| /javadocs/                     | 2          |
| /software/perl/                | 1          |
| /software/software/acedb/      | 1          |
| /WWW/software/CGI/examples     | 1          |
| /WWW/software/CGI/index.html   | 1          |
+--------------------------------+------------+
10 rows in set (0.04 sec)