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
Similar Kata:
Stats:
Created | Oct 20, 2016 |
Published | Oct 21, 2016 |
Warriors Trained | 24614 |
Total Skips | 3203 |
Total Code Submissions | 87679 |
Total Times Completed | 10487 |
SQL Completions | 10485 |
Total Stars | 331 |
% of votes with a positive feedback rating | 90% of 1214 |
Total "Very Satisfied" Votes | 1014 |
Total "Somewhat Satisfied" Votes | 169 |
Total "Not Satisfied" Votes | 31 |
Total Rank Assessments | 9 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 7 kyu |