Comments on: How to find data distributions with SQL http://www.xaprb.com/blog/2006/06/10/how-to-find-data-distributions-with-sql/ Stay curious! Mon, 13 May 2013 05:55:40 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Flamander http://www.xaprb.com/blog/2006/06/10/how-to-find-data-distributions-with-sql/#comment-14865 Flamander Fri, 11 Jul 2008 17:42:22 +0000 http://www.xaprb.com/blog/?p=142#comment-14865 SO many thanks.. that was really useful for me… I was trying to do a report of salaries grouped by ranges and I had no idea how to do it… and at the end the result was: SELECT concat( start, ‘-’, end ) AS range, count( salary ) AS total FROM employees INNER JOIN ranges ON employees.salary BETWEEN ranges.start AND ranges.end GROUP BY ranges.start, ranges.end

]]>