Similar to numeric calculations, many string functions exist to allow for various calculations. Let's look at some of the key string calculations and how they can be used.
Building string calculations
Functions related to obtaining substrings from a string
One of the most common use cases when dealing with strings is that we want only parts of the string and not all. Many functions help us to do that. Let's have a look at what functions we can use.
LEFT: This follows the syntax LEFT (string, num_chars).
Using LEFT, the num_chars specified starting from the start of a string is returned. This becomes very useful for grouping.
For example, we want to find the customers who have ordered the most, based on what letter...