7 kyu

Countries Capitals for Trivia Night (SQL for Beginners #6)

Description:

Your friends told you that if you keep coding on your computer, you are going to hurt your eyes. They suggested that you go with them to trivia night at the local club.

Once you arrive at the club, you realize the true motive behind your friends' invitation. They know that you are a computer nerd, and they want you to query the countries table and get the answers to the trivia questions.

Schema of the countries table:

  • country (String)
  • capital (String)
  • continent (String)

The first question: from the African countries that start with the character E, get the names of their capitals ordered alphabetically.

  • You should only give the names of the capitals. Any additional information is just noise
  • If you get more than 3, you will be kicked out, for being too smart
  • Also, this database is crowd-sourced, so sometimes Africa is written Africa and in other times Afrika.

Resources:

NOTE: Your solution should use pure SQL. Ruby is used within the test cases just to validate your answer.


SQL for Beginners Series

This kata is part of a collection of SQL challenges for beginners. You can take the rest of the challenges here:

  1. Adults only (SQL for Beginners #1)
  2. On the Canadian Border (SQL for Beginners #2)
  3. Register for the Party (SQL for Beginners #3)
  4. Collect Tuition (SQL for Beginners #4)
  5. Best-Selling Books (SQL for Beginners #5)
  6. Countries Capitals for Trivia Night (SQL for Beginners #6)
Fundamentals
SQL
Databases
Data Science

Stats:

CreatedMar 4, 2020
PublishedMar 4, 2020
Warriors Trained17912
Total Skips720
Total Code Submissions61470
Total Times Completed13866
SQL Completions13866
Total Stars137
% of votes with a positive feedback rating92% of 1192
Total "Very Satisfied" Votes1032
Total "Somewhat Satisfied" Votes121
Total "Not Satisfied" Votes39
Total Rank Assessments55
Average Assessed Rank
7 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • MaikelNabil Avatar
  • Chrono79 Avatar
  • user8436785 Avatar
Ad