Selection and Sorting in Order
Last updated
Last updated
spicy.db
Table Name: hotpeppers; Showing only first 3 peppers
Jalapeno
8000
12
Serrano
5000
7
Habanero
350000
8
There are 23 named hot peppers in the dataset
name
-> TEXT column of hot pepper names
maxSHU
-> INTEGER column of each pepper's maximum level of range
inventory
-> INTEGER column of random counts of how many peppers are available
Query
Output
We can add an ORDER BY
statement to sort based on column. We can also add ASC
for least to greatest or DESC
for the opposite.
An ORDER BY
statement should be written after a WHERE
clause
List the names of peppers in alphabetical order with a query
List all the pepper data ordered from least to most spicy