Statistics With MySQL

by damonp on June 30, 2006

in Data Architecture,Snippets

Need a quick count of repeated occurences of matching rows for statistical analysis?

SELECT search_query, count( search_query ) AS total
FROM search_log
GROUP BY search_query
ORDER BY total DESC

Popularity: 1%

Most Popular Posts

Damon Parker is a freelance sysadmin and web developer in Texas. He specializes in server setup, server security and high performance server configurations. Need help setting up a web server or getting a server back online after a crash or hack? Email Damon

Leave a Comment

Previous post:

Next post: