Aus dem Kurs: SQL Essential Training
Calculating with functions – Tutorial zu SQL
Aus dem Kurs: SQL Essential Training
Calculating with functions
- I think before we say another word about SQL let's recognize what you've accomplished so far. You just got through joins. That's a job well done, and I know because joins were my biggest pain point when I first got started with SQL. Now think about the following request. How many customers do we have whose last name starts with S? To answer this request with SQL one approach would be to select the last name's field from the customer's table, order by last name, scroll down to the S names, and then count those names manually. Another approach would be to filter our results to return only Last names starting with S, using the where clause which would make the counting process easier. Both these methods require some sort of manual counting to get the answer to the request. In this chapter I'll show you how to use something called functions to simplify your calculations and eliminate the need for you to do any manual counting, functions are one of the most powerful features of SQL. With them, you can do complex calculations on your data with a single line of code. Let's take a look at some of the most commonly used functions in SQL including aggregate, string, date and time functions. Let's go.
Üben mit Projektdateien
Laden Sie die Dateien herunter, die von den Trainer:innen verwendet werden. So können Sie mitlesen und durch Ansehen, Zuhören und Üben lernen.
Inhalt
-
-
-
-
-
-
-
-
-
Calculating with functions1 Min. 43 Sek.
-
(Gesperrt)
String, date, and aggregate function types39 Sek.
-
(Gesperrt)
Connecting strings4 Min. 57 Sek.
-
(Gesperrt)
Separating text4 Min. 19 Sek.
-
(Gesperrt)
UPPER and LOWER string functions1 Min. 59 Sek.
-
(Gesperrt)
Date functions5 Min. 42 Sek.
-
(Gesperrt)
Aggregate functions4 Min. 26 Sek.
-
(Gesperrt)
Nesting functions3 Min. 10 Sek.
-
-
-
-
-
-
-