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.
Fuzzy string matching - SQL Tutorial
From the course: Introduction to SQL Using Google BigQuery
Fuzzy string matching
- [Instructor] The WHERE clause is very useful when we want to look at exact matches. But did you know that we can also use it to perform partial or fuzzy matching with string data type columns? We can use the SQL LIKE operator in BigQuery to find matches in string data which contain a specific pattern in a record value. For example, let's say we wish to find all the records in our products table where the word Dog appears in the product_name field. We can use a WHERE clause and the LIKE operator to perform a fuzzy string match. The percentage sign characters in this query that surrounds Dog are called wildcards. These characters let BigQuery know that we only care if the word Dog appears in a string value. If I were to remove the percentage sign before the Dog, but kept the one after, I'm asking BigQuery to only give me matches where Dog appears at the beginning of the product_name column. On the other hand, if I…
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)
-
-
-
-