Recap - Parliamentary Election
Part of the Fundamentals section of Coddy's SQL journey. Lesson 27 of 72.
Challenge
EasyAvailable tables and columns:
ministers:seat,is_next_gov,is_spoke_bad
Every minister that sits on an even numbered seat in the government is considered a "safe" minister. Your job is to return all of the "safe" ministers seats that want to continue serving in the next government while excluding any minister who spoke a bad word.
The result should contain only the relevant seats.
Before starting to solve the challenge take a look at the table data. It is not clean. The columns is_next_gov and is_spoke_bad contain ones and zeros and also yes's and no's.
Try it yourself
All lessons in Fundamentals
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columnsPractice on your own: SQL playground