Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 491 Bytes

SQL-Basics-Simple-GROUP-BY.md

File metadata and controls

19 lines (13 loc) · 491 Bytes

For this challenge you need to create a simple GROUP BY statement, you want to group all the people by their age and count the people who have the same age.

people table schema

  • id
  • name
  • age select table schema
  • age [group by]
  • people_count (people count)

NOTE: Your solution should use pure SQL. Ruby is used within the test cases to do the actual testing.

-- Create your SELECT statement here

SELECT age , COUNT(age) as people_count FROM people GROUP BY age