SQL Important syntax
Tue Mar 22 2022 08:00:05 GMT+0000 (Coordinated Universal Time)
Saved by
@Bambibo9799
split_part
case when, sum case when
round
coalsece = COALESCE(Title,Suffix,FirstName) AS NewValue
lag
partition by
lead
extract
concat('Q','',qt_sale)
concat_ws
len
charindex
ntile
rows between unpreceding bound and current rows/ preceding bound
||
substring
replace
rollup(column name) = GROUP BY
cube(column name) = GROUP BY - non hierical, calculate all possible aggregations
update-set, alter table-add
into
isnull, column = null
cast or using ::
wildcard % like, like 200_ (underscore wildcard), not like,
string_agg(column name, ',') put column name and delimiter, and it sorted based on the value
lower
upper
initcap
LPAD
ilike
substring = - SELECT substring('$15us', 2, 2)AS price;
- substring(email from position('@'in email)+1 for char_length(email)),
- left(email, position('@' in email)-1)
SELECT * from Product_sales where (From_date <= '2013-01-09' AND To_date >= '2013-01-01')
SELECT * FROM Orders
WHERE OrderDate BETWEEN '1996-07-01' AND '1996-07-31';
CREATE TABLE student(
id SERIAl,
content_copyCOPY
Comments