7 kyu

SQL Basics: Simple JOIN with COUNT

20,384matt 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 Trained31061
Total Skips1874
Total Code Submissions73067
Total Times Completed20384
SQL Completions20384
Total Stars147
% of votes with a positive feedback rating86% of 2012
Total "Very Satisfied" Votes1528
Total "Somewhat Satisfied" Votes403
Total "Not Satisfied" Votes81
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