Join Scott Simpson for an in-depth discussion in this video Use the exercise files, part of Learning SQL Programming.
- [Instructor] The exercise files for this course are available to anyone watching. They consist of two .sql files, and .db file. Depending on how you follow along with the course, you'll probably use only one or the other of the files called, results. The results.db file is a SQLite database that we'll use to minimize the setup and jump right into working with the SQL language. The results.sql file is a copy of the database for the course in a format that can be imported into a database management system or DBMS. If you choose to use your own software to follow along with the course.
Depending on the software you use, you'd need to open or import the file, and it'll create the database and the two tables that the course depends on. I've also included a file called statements.sql, which has a copy of every SQL statement used in the course, organized by video. So, if you're typing along and have a problem, you can check what happened by comparing what you typed to what I typed. You'll be able to open this file in any plain text editor. And it's helpful to keep notes as you go along. If you're looking for a plain text editor, I recommend Atom for Mac, Windows, or Linux.
Or, you can use the plain text editor mode of your system's text editor. Getting started with learning SQL can require a lot of technical setup. In order to run SQL queries, we need a database. But many database applications need their own fairly complicated configuration. So in this course, I've given you the option of following along with the basic application, or using your own tools. And, depending on you or your administrator to know how to get the data into it. The database that the course uses includes two tables called, People, and States. The People table contains some information about a thousand people in the U.S., who participated in a fictional quiz competition.
We have their scores, what team they signed up to be a part of, the company they work for, the city and state they live in, an ID number, and whether they opted to get a shirt or a hat for participating in the competition. The States table includes abbreviations and full names of states in the U.S., and information about what census region and division each state is part of. I generated the data in the People table using the Mockaroo website, which is a great way of generating different kinds of data for practicing with databases. And the State information is available from the U.S. Census website.
- What is SQL?
- Asking for data with SELECT
- Limiting database responses
- Organizing responses
- Asking for data from two or more tables
- Understanding join types and data types
- Transforming data
- Performing math
- Adding and modifying data in a table