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:

schema

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

Stats:

CreatedAug 2, 2017
PublishedAug 2, 2017
Warriors Trained7282
Total Skips1455
Total Code Submissions15284
Total Times Completed3423
SQL Completions3421
Total Stars110
% of votes with a positive feedback rating93% of 411
Total "Very Satisfied" Votes361
Total "Somewhat Satisfied" Votes39
Total "Not Satisfied" Votes11
Total Rank Assessments10
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • marko-bekhta Avatar
  • smile67 Avatar
Ad