Collections:
Group Functions Used with Non-group Selection Fields in Oracle
Can Group Functions Be Mixed with Non-group Selection Fields in Oracle?
✍: FYIcenter.com
If a group function is used in the SELECT clause, all other selection fields must be group level fields. Non-group fields can not be mixed with group fields in the SELECT clause. The script below gives you an example of invalid SELECT statements with group and non-group selection fields:
SQL> SELECT COUNT(*), department_id FROM departments; ORA-00937: not a single-group group function
In this example, COUNT(*) is a group field and department_id is a non-group field.
⇒ Divide Query Output into Groups in Oracle
⇐ Use Group Functions in the SELECT Clause in Oracle
2019-11-21, 3071🔥, 0💬
Popular Posts:
How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions in SQL Server Transact-...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...
What Happens If the Imported Table Already Exists in Oracle? If the import process tries to import a...
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...