Category: SQL

SQL AVG

SQL AVG The SQL AVG function returns the average in a select query. AVG syntax SELECT AVG(table_column) FROM table_name; AVG example Coder books table ID Title Price Description 1 Learn SQL 20 Learn SQL language 2 Learn MySQL 22 Learn MySQL...

SQL Having

SQL Having The SQL HAVING is typically used with a GROUP BY clause. The HAVING is used to return records where aggregate values meet the specified conditions. Having syntax SELECT column_name1, column_name2, function(column_name1) FROM table_name GROUP BY column_name1, column_name2 HAVING function(column_name1)...

SQL Group By

SQL Group By The SQL GROUP BY is used when at least one of the aggregation functions is used in a select query. The aggregate functions are: count, max, min, sum, avg. Group By syntax SELECT column_name1, column_name2, function(column_name1) FROM table_name...

SQL Order By

SQL Order By The SQL ORDER BY is used to sort the records of a select query. Order By syntax SELECT * FROM table_name ORDER BY column_name ASC | DESC; Order By example Coder books table ID Title Price Description 1...

SQL Like

SQL Like The SQL LIKE is used to return lines if the operand matches a pattern in a select query. Like syntax SELECT * FROM table_name WHERE column_name LIKE pattern; Like example Coder books table ID Title Price Description 1 Learn...