Skip to main content

SQL

Want to Learn SQL?

SQL is a powerful language that is simple to learn! Once you learn to use SQL, you will shortly realize that you will have the power to communicate and pull information from most databases in the nation.

In the BYU Information Systems program, you will dive deeper into databases and SQL. If you’ve never heard of SQL before, you are in luck! Because you can learn everything you need to get started here and then continue learning in the IS program.

Watch the video to get started, then complete the exercise below:

Intro to Database and SQL

SQL Exercise

Imagine you work for Disney in their Star Wars division. Your manager has asked you to use SQL to retrieve the data from the database and complete the tasks below.

The name of the table is StarWars. The table columns are as follows:

  • Name
  • Birth_Year
  • Mass
  • Gender

Using SQL statements, complete the tasks below:

  1. Retrieve all of the records from the database
  2. Retrieve the name and birth year of the characters
  3. Retrieve only the male characters
  4. Retrieve the characters that weigh more than 70 kilograms

The results will output below:

Display answers for tasks:


Select * From StarWars; -- or -- Select Name, Birth_Year, Mass, Gender From StarWars;
Select Name, Birth_Year From StarWars;
Select * From StarWars Where Gender = "Male"; -- or -- Select Name, Birth_Year, Mass, Gender From StarWars Where Gender = "Male";
Select * From StarWars Where Mass > 70 -- or -- Select Name, Birth_Year, Mass, Gender, From StarWars Where Mass > 70;



This shouldn't display

Want to learn more?

If you enjoyed learning about Databases and SQL, apply to the Information Systems program! Click on the link below to continue practicing with SQL.

Download SQL Practice Files
Clicking this link will download a zip file that contains a Microsoft Access database file and instructions on how to get started.