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, 1560🔥, 0💬
Popular Posts:
How Fixed Length Strings Are Truncated and Padded in SQL Server Transact-SQL? When the length of the...
How To Create a Table Index in Oracle? If you have a table with a lots of rows, and you know that on...
How to download and install SQL Server 2005 Sample Scripts in SQL Server? If you want to learn from ...
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in ...
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...