SQL SUM Function The SUM function returns the sum of all values from the select. Null values are ignored. SQL SUM syntax SELECT SUM(column_name) FROM table_name; Training_Course ID NAME DURATION PRICE 1 SQL 5 200 2 T-SQL 7 700 3 MySQL...
SQL MIN Function The MIN function returns the minimum value in the expression. SQL MIN syntax SELECT MIN(column_name) FROM table_name; Training_Course ID NAME DURATION PRICE 1 SQL 5 200 2 T-SQL 7 700 3 MySQL 5 600 4 PL/SQL 7 800...
SQL MAX Function The MAX function returns the maximum value in the expression. SQL MAX syntax SELECT MAX(column_name) FROM table_name; Training_Course ID NAME DURATION PRICE 1 SQL 5 200 2 T-SQL 7 700 3 MySQL 5 600 4 PL/SQL 7 800...
SQL Count Function The COUNT function returns the number of items in a group. COUNT function returns an int data type value. SQL COUNT syntax SELECT COUNT(*) FROM table_name; Training_Course ID NAME DURATION PRICE 1 SQL 5 200 2 T-SQL 7...
SQL AVG Function The AVG function returns the average of the values in a group. Null values are ignored. SQL AVG syntax SELECT AVG(column_name) FROM table_name; Training_Course ID NAME DURATION PRICE 1 SQL 5 200 2 T-SQL 7 700 3 MySQL...
SQL SELF JOIN A table can be joined to itself in a self-join. SQL Self Join syntax SELECT column_name(s) FROM A_table, B_table WHERE A_table.column_name = B_table.column_name; Test ID NAME PARENT_ID 1 aaa NULL 2 bbb NULL 3 ccc 1 4 ddd...
SQL CROSS JOIN The CROSS JOIN returns the Cartesian product of the tables involved in the join. SQL Cross Join syntax SELECT column_name(s) FROM A_table CROSS JOIN B_table; Test1 ID TITLE 1 aaa 2 bbb 3 ccc Test2 ID TITLE 1...
SQL FULL JOIN The FULL JOIN returns all rows from the joined tables. SQL Full Join syntax SELECT column_name(s) FROM A_table FULL JOIN B_table ON A_table.column_name = B_table.column_name; Training_Course ID NAME DURATION PRICE 1 SQL 5 200 2 T-SQL 7 700...
SQL RIGHT JOIN The RIGHT JOIN returns all rows from the table B, whether or not there is a match with table A. SQL Right Join syntax SELECT column_name(s) FROM A_table RIGHT JOIN B_table ON A_table.column_name = B_table.column_name; Training_Course ID NAME...
SQL LEFT JOIN The LEFT JOIN returns all rows from the table A, whether or not there is a match with table B. SQL Left Join syntax SELECT column_name(s) FROM A_table LEFT JOIN B_table ON A_table.column_name = B_table.column_name; Training_Course ID NAME...
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.