Here are three examples of returning a list of stored procedures that reference a specific table in PostgreSQL.
Continue readingTag: window functions
6 Ways to Select Duplicate Rows in SQLite
The following queries can be used to return duplicate rows in SQLite.
Here, the duplicate rows contain duplicate values across all columns, including the ID column.
Continue reading5 Ways to Select Rows with the Maximum Value for their Group in SQL
Here are five options for using SQL to return only those rows that have the maximum value within their group.
These examples work in most major RDBMSs, including MySQL, MariaDB, Oracle, PostgreSQL, SQLite, and SQL Server.
Continue reading4 Ways to Select Duplicate Rows in PostgreSQL
If you have a table with duplicate rows in PostgreSQL, you can use any of the following queries to return the duplicate rows.
Continue reading3 Ways to List All Functions in PostgreSQL
Here are three options for listing out all functions in a PostgreSQL database.
Continue readingSUM() Function in SQL Server
In SQL Server, 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 the expression.
SUM()
only works on numeric columns. Null values are ignored.
3 Ways to List all Stored Procedures in a PostgreSQL Database
Here are three options for listing out all the stored procedures in a Postgres database.
Continue readingSUM() Function in MySQL
In MySQL, 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 readingCOUNT() Function in MariaDB
In MariaDB, the COUNT()
aggregate function returns a count of the number of non-NULL values of an expression in the rows retrieved by a SELECT
statement.
AVG() Function in MariaDB
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.