*****CLAUSES *****
LIMIT CLAUSE
SELECT name,age FROM users3 WHERE age>15 LIMIT 2;
ORDER BY CLAUSE
SELECT name,age,followers FROM users3 ORDER BY followers;
AGGREGATE FUNCTIONS
COUNT()
SELECT count(name)FROM users3 WHERE age<20;
MAX()
SELECT max(followers) FROM users3;
MIN()
SUM()
AVG()
GROUP BY CLAUSE
SELECT age,count(followers) FROM users3 GROUP BY age;
SELECT age,max(followers) FROM users3 GROUP BY age;
HAVING CLAUSE
SELECT age,max(followers) FROM users3 GROUP BY age HAVING max(followers)>55;







Comments
Post a Comment