If we wanted to know what months the animal center took in between 900 and 1000 animals, we could write the following query:
SELECT year, month, animal_type, COUNT FROM austin_animal_center_intakes_by_month WHERE count BETWEEN 900 AND 2000 ORDER BY month
And the results would look like:
Though it isn’t clearly illustrated by the last query, note that
BETWEEN returns everything between two values inclusive of the specified vales.
Exercises (Continued from previous section)
There are two ways to do these exercises. The first is to use the “Try query” links to test your queries without saving them. The second is to create a data.world project and save your queries to it. If you are reading this documentation and completing the exercises as a tutorial, you will need to create your own project to save your work. Details and instructions are in the SQL tutorial which has instructions for setting up your project and links to all the current exercises.
Using the patient, description and value columns in the observations table, write a query that returns all the patients expected to have between one and five quality years of life left. (Use the description column and “Quality adjusted life years”).
“Quality adjusted life years”
An introduction to the keyword