Activity 4: Select Multiple Info

Workshop Resources

Task 4: Find Their Leader

After going to the Capital of Fun, you are told by the inhabitants to talk to their Leader. Find out which inhabitant is the Leader. To do so, let’s take a look at how to select multiple columns in a database.


Now use what you learned to find out who is the leader of the Planet of Fun!

You can view the entire database using the SELECT * FROM [database_name]; command that you learned in activity 1.

The Galactic Federation also sends you a reminder that the ‘galaxy’ database holds the following columns:

  • planet_number: What order the planets show up in the database.

  • planet: The name of the planet.

  • leader: The name of the leader of the planet.

  • population: How many inhabitants live on the planet.

  • coordinate: The location of the planet in the galaxy.

Hint: Only two columns are needed.

Question: Using the ‘galaxy’ database, how do you display only the names of the planets and their leader?

Don’t forget the semicolon at the end!

Type command here!