SQL Numeric Types
- 01:24
The different numeric types in SQL
Downloads
No associated resources to download.
Glossary
Transcript
SQL server has many inbuilt numeric functions just like the inbuilt string functions.
Some really useful inbuilt numeric functions which are not limiting, are firstly the A BS function, which is the absolute value function.
And this simply returns the absolute value of a number.
So we could select a certain value from our database, and we can use this function to calculate the absolute value.
The next function is the A VG function, which is the average value function.
This simply returns the average value of a subset of a selected data.
So let's say we've selected a subset of the data from the database, it can be a certain number of roles, and if we want to calculate the average values of in this roles, we can simply use the A VG function.
The count simply returns the number of records of a selected query.
So for example, let's say we've got the share price dataset, and if we want to count the number of values for a specific ticker, we could use this function.
Then the maximum function, just like they say, return the maximum and the minimum value in a set of values.
And finally, a really useful function is to some function, which returns to some of a set of values.
So for example, again, if we've got a specific database and we want to calculate the sum of the money invested by clients, we could simply use this function.