Untitled
02/02/2024 ----------------------------------------------------------------------- distinct keywords: - the distinct is used for return only unique(diffrerent) value. syntax: select distinct column from tablename ex: select name from employeeinfo; select distinct name from employeeinfo; select distinct name,salary from employeeinfo; -------------------------------------------------------------------------------------------------------------------------- Aggregate function: 1.count() 2.min() 3.max() 4.avg() 5.sum() count() ------------- 1.count(): return number of records with match specific criteria. syntax: select count(columns) from tablename. ex: select count(*) from employeeinfo; select count(distinct address) from employeeinfo; select count(salary) from employeeinfo; select count(distinct salary) from employeeinfo;
Leave a Comment