- [Instructor] To create this report in the proper format,…requires understanding something called SQL subqueries,…and that's what we'll do first, and then I'll show…how this works with the SQL main query…to generate the correct format.…So I'm going to open the code…that produces the correct report.…It's found in searchSolution_2,…and that's in the Exercise Files, CH04,…here is searchSolution_2.…
I'll open that up in DB Browser for SQLite,…and let's take a quick look at what that all looks like.…Again, first of all, this is just a comment…in lines 1 through 7, and the actual SQL…is lines 9 through the end.…You'll notice that in the middle of the SQL query…is a subset enclosed by parenthesis,…and it looks very much like an SQL query…that could stand on its own.…
Let's go ahead and run this entire code to see how it works,…and then we'll break it apart,…and I'll show you how the subquery makes a difference.…So I'm going to go up, and this is in DB Browser,…and I'm going to press the Execute SQL button,…and it will pull data from the secondTable table,…
- Strengths and weaknesses of SQLite
- Creating a database
- Joining data sets
- Calculations with SQLite and Python
- Searching a database
- Subqueries and queries in SQLite
- CRUD operations in SQLite with R
Skill Level Intermediate
1. SQLite in Five Minutes
2. Create a Database
3. Join Two Datasets
4. Search a Database
5. Create, Read, Update, and Delete Operations
6. Averages and Calculations
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.