6 kyu
SQL Basics: Simple EXISTS
13,870 of 13,874matt 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
Similar Kata:
Stats:
Created | Oct 26, 2016 |
Published | Oct 26, 2016 |
Warriors Trained | 22949 |
Total Skips | 2521 |
Total Code Submissions | 77773 |
Total Times Completed | 13874 |
SQL Completions | 13870 |
Total Stars | 181 |
% of votes with a positive feedback rating | 85% of 1591 |
Total "Very Satisfied" Votes | 1193 |
Total "Somewhat Satisfied" Votes | 328 |
Total "Not Satisfied" Votes | 70 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |