My SQL Shortcut
My SQL Shortcut
SUM
--SUM) calculates the sum of a numeric column --
AVG
-- AVG0 calculates the average of a numeric column --
SELECTAVG(salary) FROMemployees;
MIN
--MINO returns the smallest value in a column -
SELECTMIN(price) FROMproducts;
MAX
--MAX)returns the largest value in a column --
UPPER
--UPPER) is used to convert all characters in a strin tou ercase --
SELECT UPPER('helloworld');
LOWER
--LOWER)is used to convert all characters in a stringto lowercase --
JOIN
--JOINO combines2 or moretables into a single result
set basedon a common column between them.
DISTINCT
--DISTINCT) returns only distinct(unique) values in a column --