From the course: Introduction to SQL Using Google BigQuery
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
WHERE clause BETWEEN and IN - SQL Tutorial
From the course: Introduction to SQL Using Google BigQuery
WHERE clause BETWEEN and IN
- [Instructor] Sometimes we will want to apply WHERE clauses, not just for equality conditions, but we might want to look for ranges of data that meet a wider set of conditions. This is where we can use inequalities and the BETWEEN and IN operators to help. Let's firstly apply a WHERE clause to return product information for all products with retail price strictly under $6. We can use this less than sign or the left angle bracket to apply this logical condition. If we also wanted to add in products which are exactly $6 to our WHERE clause, we can add in an extra equal sign after the less than to apply less than or equal to logic for our query. To perform this style of inequality but in the opposite direction, we can use the greater than sign or the right angle bracket to apply this in our WHERE clause. In this example, we can find all items strictly greater than $55 with this logic. Again, if we wanted to include the…
Contents
-
-
-
-
(Locked)
SELECT statement9m 29s
-
(Locked)
ORDER BY clause4m 53s
-
(Locked)
WHERE clause conditional logic5m 55s
-
(Locked)
WHERE clause BETWEEN and IN7m 6s
-
(Locked)
Fuzzy string matching5m 47s
-
(Locked)
COUNT function6m 35s
-
(Locked)
Calculation functions7m 58s
-
(Locked)
Challenge: Wisdom Pet, quiz 11m 47s
-
(Locked)
Solution: Wisdom Pet, quiz 110m 48s
-
(Locked)
-
-
-
-