In MariaDB, the AVG()
function returns the average value of the given expression.
The DISTINCT
option can be used to return the average of the distinct values (i.e. remove duplicates before calculating the average).
NULL
values are ignored.
Database Management Systems
In MariaDB, the AVG()
function returns the average value of the given expression.
The DISTINCT
option can be used to return the average of the distinct values (i.e. remove duplicates before calculating the average).
NULL
values are ignored.
Here are two options we can use to add an option to our sql_mode
without wiping all existing options.
In MariaDB, the SUM()
aggregate function returns the sum of a given expression.
It can also be used to return the sum of all distinct (unique) values in an expression.
Continue readingIf you use SQLcl to query Oracle Database, you might be aware of the SET SQLFORMAT json
option, that makes query results come back as JSON documents.
But there’s also a json-formatted
option, which returns the results in a more human readable format.
SQL Server has a HAS_DBACCESS()
function that returns information about whether the user has access to a specified database.
There are several data dictionary views that we can use to return a list of stored procedures in Oracle Database.
Continue readingIn MariaDB, MIN()
is an aggregate function that returns the minimum value in a given expression.
In MariaDB, MAX()
is an aggregate function that returns the maximum value in a given expression.
In Oracle Database, you can use the fm
(fill mode) format modifier to suppress any leading zeroes that might be applied to a date. This format modifier suppresses padding, which includes leading zeros and trailing blanks.
To use the fm
format modifier, include it in your format model when specifying how dates should be formatted. For example when using the TO_CHAR()
function to format dates, or in NLS parameters such as the NLS_DATE_FORMAT
parameter when setting the date format for your current session.
Below are two options for returning a list of functions in MariaDB.
Continue reading