␡
- Exercise 40. Reading with SQL
- Exercise Challenge
- Further Study
This chapter is from the book
Exercise Challenge
- Write a query that finds all pets older than 10 years.
- Write a query to find all people younger than you. Do one that’s older.
- Write a query that uses more than one test in the WHERE clause using the AND to write it. For example, WHERE first_name = "Zed" AND age > 30.
- Do another query that searches for rows using three columns and uses both AND and OR operators.
- This may be a mind-blowing, weird way to look at data if you already know a language like Python or Ruby. Take the time to model the same relationships using classes and objects, then map it to this setup.
- Do a query that finds your pets you’ve added thus far.
- Change the queries to use your person.id instead of the person.name like I’ve been doing.
- Go through the output from your run, and make sure you know what table is produced for which SQL commands and how they produced that output.