Unit 3 - SQL Queries Flashcards
ALTER TABLE
A statement that makes structural changes to a table.
AVG
The function that calculates the average of non-null values.
AVG Function
A function that calculates the average value of the entries in a numeric column. It is commonly used in statistical calculations and data analysis.
Aggregate
To combine individual items or objects and treat the combined set as a single unit.
Aggregate Function
A function that operates on multiple records and returns a single value that summarizes them, such as producing a count, sum, or average.
Boolean Expression
An expression that can be evaluated as either true or false.
CHECK
A constraint that uses a Boolean expression to evaluate whether the value is valid when inserted into or updated in the column.
COALESCE
This function in PostgreSQL returns the first non-null value from a list of expressions. It evaluates multiple arguments in order, returning the first non-null value encountered.
COUNT
The function that returns the number of rows in a result set.
Cascading Order
A multilevel sequence used for complex sorting operations.
Casting
To change the data type for all entries in a column when that column’s data type changes.
Clause
An individual command used in a statement.
Constraint
A rule that imposes limitations on what can be done. In the context of a database table, a constraint limits what data can be entered.
DISTINCT
A keyword in PostgreSQL that enables you to limit query results to unique values from a specified column in a result set. It can be used on its own or with an aggregate function such as SUM.
DROP TABLE
A SQL statement that removes a table from a database.
FROM Clause
The part of a SQL SELECT statement that identifies which tables should be used as the data source.
Foreign Key
The term foreign key refers to when a primary key from one table appears in another.
GROUP BY
A clause that calculates aggregates within a group of rows, with groups created based on values in one or more specified columns.
HAVING Clause
A clause that enables you to filter the results of a GROUP BY clause according to specified conditions.
INSERT INTO
A statement that creates a new row or updates an existing row in a table.
LIMIT Clause
A clause that limits the number of rows returned by a query.
MAX
The function that returns the largest of the non-null values.
MAX Function
A function that reports the largest value for a certain column in a dataset or result set.