6 kyu
SQL Basics: Simple PIVOTING data WITHOUT CROSSTAB
3,421 of 3,423marko-bekhta
Description:
This kata is inspired by SQL Basics: Simple PIVOTING data by matt c.
You need to build a pivot table WITHOUT using CROSSTAB function. Having two tables products
and details
you need to select a pivot table of products with counts of details occurrences (possible details values are ['good', 'ok', 'bad']
.
Results should be ordered by product's name
.
Model schema for the kata is:
your query should return table with next columns
- name
- good
- ok
- bad
Compare your table to the expected table to view the expected results.
Fundamentals
SQL
Databases
Similar Kata:
Stats:
Created | Aug 2, 2017 |
Published | Aug 2, 2017 |
Warriors Trained | 7282 |
Total Skips | 1455 |
Total Code Submissions | 15284 |
Total Times Completed | 3423 |
SQL Completions | 3421 |
Total Stars | 110 |
% of votes with a positive feedback rating | 93% of 411 |
Total "Very Satisfied" Votes | 361 |
Total "Somewhat Satisfied" Votes | 39 |
Total "Not Satisfied" Votes | 11 |
Total Rank Assessments | 10 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 7 kyu |