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

Stats:

CreatedJul 3, 2017
PublishedJul 3, 2017
Warriors Trained14561
Total Skips1535
Total Code Submissions30968
Total Times Completed8289
SQL Completions8287
Total Stars102
% of votes with a positive feedback rating87% of 877
Total "Very Satisfied" Votes683
Total "Somewhat Satisfied" Votes154
Total "Not Satisfied" Votes40
Total Rank Assessments10
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • PG1 Avatar
  • jhoffner Avatar
  • smile67 Avatar
Ad