In this exercise, we move onto the Read part of CRUD. We make four selections in the exercise code from our database.
- 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 3 columns and uses both AND and OR operators.
I added the queries below the original exercise.
I keep forgetting the semi-colon at the end, a side effect from working through Learn Ruby the Hard Way!