SQL Functions
SQL Functions
2. Scalar Functions
4. Mathematical Functions
5. String Functions
6. Conversion Functions
7. Window Functions
8. System Functions
COUNT()
SUM()
AVG()
MAX()
MIN()
NOW()
CURDATE()
YEAR()
DATE()
DATEDIFF()
Output:
2. CURDATE(): Current Date
ROUND()
CEIL()
FLOOR()
ABS()
POWER()
SQRT()
1. ROUND(): Round to Nearest Integer or Decimal Place Output:
CONCAT()
UPPER()
LOWER()
SUBSTRING()
REPLACE()
LENGTH()
TRIM()
CAST()
CONVERT()
ROW_NUMBER()
RANK()
DENSE_RANK()
LEAD()
LAG()
Output:
Output:
Output:
Output:
5. LAG(): Accesses data from the previous row in the result set.
Output:
USER()
DATABASE()
VERSION()
Scope _IDENTITY( )
IF()
CASE
COALESCE()
NULLIF()
1. IF: Returns one value if a condition is true and another value if it's false
(primarily in MySQL).
Output:
Output:
Output:
Output:
JSON_OBJECT()
JSON_ARRAY()
JSON_EXTRACT()
JSON_VALUE()
Output:
Output:
Output:
Output: