6 kyu
SQL Basics: Simple UNION ALL
12,340 of 12,344matt c
Description:
For this challenge you need to create a UNION statement, there are two tables ussales
and eusales
the parent company tracks each sale at its respective location in each table, you must all filter the sale price so it only returns rows with a sale greater than 50.00
. You have been tasked with combining that data for future analysis. Order by location (US before EU), then by id.
(us/eu)sales table schema
- id
- name
- price
- card_name
- card_number
- transaction_date
resultant table schema
- location (EU for eusales and US for ussales)
- id
- name
- price (greater than 50.00)
- card_name
- card_number
- transaction_date
NOTE: Your solution should use pure SQL. Ruby is used within the test cases to do the actual testing.
SQL
Fundamentals
Similar Kata:
Stats:
Created | Oct 26, 2016 |
Published | Oct 26, 2016 |
Warriors Trained | 21048 |
Total Skips | 2478 |
Total Code Submissions | 63940 |
Total Times Completed | 12344 |
SQL Completions | 12340 |
Total Stars | 152 |
% of votes with a positive feedback rating | 85% of 1402 |
Total "Very Satisfied" Votes | 1060 |
Total "Somewhat Satisfied" Votes | 276 |
Total "Not Satisfied" Votes | 66 |
Total Rank Assessments | 9 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |