6 kyu

SQL Basics: Simple table totaling.

10,485 of 10,487matt c

Description:

For this challenge you need to create a simple query to display each unique clan with their total points and ranked by their total points.

people table schema

  • name
  • points
  • clan

You should then return a table that resembles below

select on

  • rank
  • clan
  • total_points
  • total_people

The query must rank each clan by their total_points, you must return each unqiue clan and if there is no clan name (i.e. it's an empty string) you must replace it with [no clan specified], you must sum the total_points for each clan and the total_people within that clan.

##Note The data is loaded from the live leaderboard, this means values will change but also could cause the kata to time out retreiving the information.

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

SQL
Fundamentals

Stats:

CreatedOct 20, 2016
PublishedOct 21, 2016
Warriors Trained24614
Total Skips3203
Total Code Submissions87679
Total Times Completed10487
SQL Completions10485
Total Stars331
% of votes with a positive feedback rating90% of 1214
Total "Very Satisfied" Votes1014
Total "Somewhat Satisfied" Votes169
Total "Not Satisfied" Votes31
Total Rank Assessments9
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • matt c Avatar
  • jhoffner Avatar
  • Unnamed Avatar
  • smile67 Avatar
  • kazk Avatar
  • FArekkusu Avatar
Ad