Collections:
Using Group Functions in the SELECT Clause in MySQL
How To Use Group Functions in the SELECT Clause in MySQL?
✍: FYIcenter.com
If group functions are used in the SELECT clause, they will be used on the rows that meet the query selection criteria, the output of group functions will be returned as output of the query. The following select statement returns 3 values calculate by 3 group functions on all rows of the "fyi_links" table:
mysql> SELECT COUNT(*), MAX(counts), MIN(created) FROM fyi_links; +----------+-------------+---------------------+ | COUNT(*) | MAX(counts) | MIN(created) | +----------+-------------+---------------------+ | 7 | 8 | 2003-01-01 00:00:00 | +----------+-------------+---------------------+ 1 row in set (0.37 sec)
⇒ Group Functions with Non-group Selections in MySQL
⇐ What Are Group Functions in MySQL
2018-01-06, 5036🔥, 0💬
Popular Posts:
What Is Transport Network Substrate (TNS) in Oracle? TNS, Transport Network Substrate, is a foundati...
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for ma...
What Are Out-of-Range Errors with DATETIME values in SQL Server Transact-SQL? When you enter DATETIM...
How To Convert a Unicode Strings to Non-Unicode Strings in SQL Server Transact-SQL? Since Unicode ch...
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte c...