SELECT x.view_group, count(*) FROM ( SELECT "view_group" ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Patents Meta

Q&A about the site for people interested in improving and participating in the patent system

SELECT x.view_group, count(*)
FROM
(
  SELECT "view_group" = 
    CASE 
      WHEN Views between 0 and 5 THEN '(0, 5)'
      WHEN Views between 5 and 10 THEN '(5, 10)'
      WHEN Views between 10 and 15 THEN '(10, 15)'
      WHEN Views between 15 and 20 THEN '(15, 20)'
      WHEN Views between 20 and 25 THEN '(20, 25)'
      WHEN Views between 25 and 30 THEN '(25, 30)'
      WHEN Views between 30 and 35 THEN '(30, 35)'
      WHEN Views between 35 and 40 THEN '(35, 40)'
      WHEN Views between 40 and 45 THEN '(40, 45)'
      WHEN Views between 45 and 50 THEN '(45, 50)'
      WHEN Views between 50 and 55 THEN '(50, 55)'
      WHEN Views between 55 and 60 THEN '(55, 60)'
      WHEN Views between 60 and 65 THEN '(60, 65)'
      WHEN Views between 65 and 70 THEN '(65, 70)'
      WHEN Views > 70 THEN 'More than 70'
    END
  FROM Users
) AS x
GROUP BY x.view_group
ORDER BY count(*) DESC;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results