7 kyu
SQL Basics: Up and Down
8,287 of 8,289PG1
Description:
Given a table of random numbers as follows:
numbers table schema
- id
- number1
- number2
Your job is to return table with similar structure and headings, where if the sum of a column is odd, the column shows the minimum value for that column, and when the sum is even, it shows the max value. You must use a case statement.
output table schema
- number1
- number2
Fundamentals
SQL
Similar Kata:
Stats:
Created | Jul 3, 2017 |
Published | Jul 3, 2017 |
Warriors Trained | 14561 |
Total Skips | 1535 |
Total Code Submissions | 30968 |
Total Times Completed | 8289 |
SQL Completions | 8287 |
Total Stars | 102 |
% of votes with a positive feedback rating | 87% of 877 |
Total "Very Satisfied" Votes | 683 |
Total "Somewhat Satisfied" Votes | 154 |
Total "Not Satisfied" Votes | 40 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |