6 kyu

SQL Basics: Simple EXISTS

13,703 of 13,707matt c

Description:

For this challenge you need to create a SELECT statement that will contain data about departments that had a sale with a price over 98.00 dollars. This SELECT statement will have to use an EXISTS to achieve the task.

departments table schema

  • id
  • name

sales table schema

  • id
  • department_id (department foreign key)
  • name
  • price
  • card_name
  • card_number
  • transaction_date

resultant table schema

  • id
  • name

NOTE: Your solution should use pure SQL. Ruby is used within the test cases to do the actual testing. Do not: alias tables as this can cause a failure.

SQL
Fundamentals

Stats:

CreatedOct 26, 2016
PublishedOct 26, 2016
Warriors Trained22703
Total Skips2509
Total Code Submissions77078
Total Times Completed13707
SQL Completions13703
Total Stars178
% of votes with a positive feedback rating85% of 1578
Total "Very Satisfied" Votes1183
Total "Somewhat Satisfied" Votes327
Total "Not Satisfied" Votes68
Total Rank Assessments8
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • matt c Avatar
  • smile67 Avatar
  • Blind4Basics Avatar
Ad