7 kyu

SQL Basics: Simple JOIN with COUNT

20,630matt c

Description:

For this challenge you need to create a simple SELECT statement that will return all columns from the people table, and join to the toys table so that you can return the COUNT of the toys

people table schema

  • id
  • name

toys table schema

  • id
  • name
  • people_id

You should return all people fields as well as the toy count as "toy_count".

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

SQL
Databases
Fundamentals

Stats:

CreatedOct 20, 2016
PublishedOct 20, 2016
Warriors Trained31431
Total Skips1888
Total Code Submissions73731
Total Times Completed20630
SQL Completions20630
Total Stars148
% of votes with a positive feedback rating86% of 2019
Total "Very Satisfied" Votes1534
Total "Somewhat Satisfied" Votes403
Total "Not Satisfied" Votes82
Total Rank Assessments9
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • matt c Avatar
  • jhoffner Avatar
  • Chrono79 Avatar
Ad