2026-08-29 15:08
Status:
Tags: IBM IBM Full Stack Software Developer Professional Certificate IBM Django Application Development with SQL and Databases SQL Django Python Frameworks Data Base Data Science Programming Lanuages
DADSD - Module 1 - Getting Started with SQL & Relational Databases
==Introduction to Data and Databases
-
Introduction to Data and Databases:
- Data is a collection of facts, numbers, words, or pictures, and is a very critical asset to any business
- It is used and collected basically everywhere, by mostly anyone
- It needs to be stored securely and easily accessible
- Database is a collection of data or information that is designed for the input, storage, search, retrieval, and modification of data from the data base using querying
- This basically is querying the database for specific information based on a set of criteria that you specify
- There are several types of databases that will get into later, and several things like data type, structure, intended use, latency requirements, and querying mechanism all play a part in the type of database that a company chooses to use
- Relation Databases (RDBMS) are built on the organization of flat files, with data organized into tabular format with rows and columns following a well defined structure and schema
- These are optimized for data operations and querying involving many tables and large volumes of data
- Standard Querying Language (SQL) is used as the standard for interacting with these kinds of databases
- Non-Relational Databases which use Not Only SQL (NoSQL), which emerged in response to the volume, speed, and diversity at which data is generated today
- Mostly due to things like IoT, the cloud, and other such metrics
- It is built for speed, flexibility, scale
- They are stored in schema-less or free-form fashion
-
Relational Databases:
-
-
Relational Databases are collections of data organized into a table structure, where the tables can be linked, or related, based on data common to each
-
Where rows are the records
-
Where columns are the attributes
-
\
-
Whenever you think about something like relating a given table to another one, you can do so with the data that exists inside of both of the tables
-
Basically, given that you have something like a customer ID, you can have basic information about said customer in one table
-
And then another customer ID would link that data to different data more closely related to finance or something
-
This way of relating tables to one another via shared data lets you create new tables that have all of the data inside of them given your query methods
-
Spreadsheets- relational databases build on the organizational principles of flat files such as excel spreadsheets, with data organized into rows and columns following a well defined structure and schema
-
The rows would be the actual entries with whatever information you want to store
-
The columns would then be the different attributes you want each entry to have, like name password etc
-
The difference however, is that relational databases are built for the optimized storage, retrieval, and processing of data for large volumes of data
-
Which is different from a spreadsheet that is limited in the number of rows and columns that it may have
-
Each table has a unique set of rows and columns, and relationships between tables can be established as well
-
You can restrict certain fields in the database to specific datatypes and values, like true or false, or only numbers or something
-
You use SQL for querying data in a few seconds
-
Security architecture of relational databases provides greater access control and governance to the data, meaning something isn’t easily stolen
-
Examples of RDBMS, they can be small, open sourced with internal support, open-source with commercial support, and closed-source as well
-
Popular relational databases include
SQLServer, MySQL, Oracle Database, and PostgreSQL -
There is also an increase in DaaS, or database as a service from the cloud, since they have access to the basically infinite computer resources of a data center, and some prominent ones are
Amazon RDS and Google SQL, IBM DB2 on Cloud, etc -
Advantages of a Relational Database- you can use one to create meaningful information by joining tables
-
You also have a ton of flexibility, you can add in new rows, or columns WHILE the database is still up and running and queries are happening
-
They also reduce redundancy, so you can generally never have two rows with the exact same information and what not
-
These are also generally pretty easy to store and backup, since they give easy import and export options
-
Use Cases for RDBMS, they are useful for things like
-
Online Transaction Processing (OLTP) which can support transaction-oriented tasks that run at high rates
-
Anything that can accommodate a large number of users
-
And something that handles small amounts of changes to data very well and quickly
-
Data Warehouses, which can be optimized for online analytical processing, letting historical data be organized and studied for businesses decisions and reasoning
-
Iot Solutions, because they provide the speed and ability to collect and process data from edge devices very quickly
-
-
Disadvantages- does NOT work well with things like semi-structured and unstructured data
-
You really need to have something with a given amount of attributes that spans the course of multiple entries, not just random items
-
-
Non-Relational Databases:
-
NoSQL (Not Only Standard Query Language) is a non-relational database design that is used for non-relation database design and provides flexible schema for the storage and retrieval of data
-
They have gained greater popularity in the era of high volume web and mobile applications, in tandem relation to cloud computing
-
They are generally easy to scale and have good performance
-
They are built for specific data models, and have flexible schemas that allow programmers to create and manage modern applications
-
They do NOT use a row/column/table database design, and generally do not use SQL to query the data inside of them, although it is possible
-
-
NoSQL allows data to be stored in a schema-less or free-form fashion
-
There are FOUR common types of NoSQL databases
- Key-Value Store- this basically works like a hash-table, where you have a set of key-value pairs that store the data
- The key is an attribute of the data and is a unique identifier of it
- Both a given key and a value can be simple items, like a string or integer, but they can also be things like complex JSON documents holding lots of information
- They are great for things like storing user data, user preferences, and real-time recommendations
- Used for things like targeted advertising
- Disadvantages include the fact that you cannot have multiple unique keys, query data on a specific data value across keys, or need a relationship between different values
- Some popular non-structured databases include
redis, Memcached, & DynamoDB - Document Based- These here basically store each record and it’s associated data within a single document
- They allow for things like flexible indexing, powerful ad hoc queries, and analytics over collections of documents
- These are great for things like eCommerce Platforms, medical records storage, or CRM (Customer Relation Management)
- This is because you can have things like individual entries for each given person in a document that is associated with them
- If you want to do things like Run complex search queries, or perform multi-operational transactions, then you would not be able to with this kind of database
MongoDB, DocumentDB, CouchDM, and Cloudantare common types of document based databases- Column Based- these basically store data in cells grouped as columns of data instead of using something like rows given more traditional types of databases
- Columns that are generally accessed together are called a column family
- So, something like customer data and information will be accesed together, but something like their purchase history would not be
- Basically, you do not store things based on each entry, but more so on each attribute as it would seem
- This makes accessing and searching the data very fast and easy, and are good for things like storing time-series data, weather data, or IoT data
- If you need to run things like complex queries, or need to have a flexible quickly changing database as well, then this might not be the best use case for you
- Common ones include
Cassandra & Appache HBASE - Graph Based- these use a graphical model to represent and store data, and are super good for things like
- Visualizing, Analyzing, and finding connections between different pieces of data
- In the image, the circles are nodes, and they contain the data while the arrows shows relationship between the given object and the category
- These would be great for working with a lot of data that is interconnected with each other, like social networks, access management, fraud detections, and network diagrams
- However, if you need a high volume of transactions it would not be the best because they are NOT optimized for large database volumes
- Popular choices include
Neo4J & CosmosDB
-
-
Relational Data Concepts:
-
Relational Model is the currently most used data model for relational databases because it allows for data independence
-
This is because it stores the data in tables which allows for logical data independence, physical independence, and physical storage independence
-
Basically, because you are using tables, you can separate out your data logically based on attributes, but also physically via the tables, and since they are all files you can transfer them to different drives and what not
-
-
Above is an ER (Entity Relationship Model) and is a bit different from a relational data model
-
Basically, it has entities which are tables, and their given relationships, so you can have something like a given kind of tree structure thing similar to OOP where you have a higher class that encases these attributes
-
For example, one author in an author list would then have a bunch of different books or something like that
-
Entity-Relationship Model is something proposes the thinking of a database as a collection of entities, it is used as a tool for creating databases
-
Entities are objects that exist independently of any other entity in the database
-
Generally, there are TWO things in an ER model, entities & attributes
-
-
An entity can be something like a Noun, and then it is basically attached to a bunch of different attributes that characterize that one noun, think of it VERY similarly to how you can the component system in video game design
-
Attributes are attached to really only one entity, and in the example, the entity “book” becomes a table inside of the database, and the attributes become the columns in that table
-
-
Entities Become Tables, however, the table has NOT yet taken the form of rows and columns, instead the attributes of a given entity become translated into columns in a table, providing the given form of rows and columns
-
Later on, you can add in the actual data about that specific entity or something which becomes the form of the table
-
This feels like having an entire table for each entry kind of
-
-
Primary Keys and **Foreign Keys
-
Is assigned a primary key, which is used to uniquely identify each tuple, or row, inside of a given table preventing duplication of data and providing a way to identify relationships between different tables
-
Foreign Keys are basically the primary key of another table that sort of create this link between the two, allowing them to reference one another
-
-
Module 1 Lesson 1 Summary:
- Structured Query Language, or SQL, was designed to manage data in relational databases and is useful for handling structured data.
- Data is a collection of facts in words, numbers, and pictures.
- A database is a repository of data that provides functionality for adding, modifying, and querying data.
- Relational databases store tabular data as collections of related items, with columns containing item properties.
- The basic SQL statements are CREATE TABLE, INSERT, SELECT, UPDATE, and DELETE.
- Non-relational databases provide a flexible and scalable approach to storing and retrieving data.
- Relational databases are ideal for the optimized storage, retrieval, and processing of large volumes of data.
- RDBMS is a mature and well-documented technology, providing flexibility, reduced redundancy, ease of backup and disaster recovery, and ACID compliance.
- An Entity-Relationship model is a tool for designing relational databases. Entities become tables, and attributes are translated into columns. .
==Basic SQL Statements
-
SELECT Statements:
- Retrieving rows from a table, basically if you have a database and what not, you want to be able to access it, and this is exactly where the
SELECTstatement comes into playSELECTis a data manipulation language (DML) statement, used to read and modify data
- The select statement is called a query and the output you get from it is the result set/table
- Syntax example includes
Select * from <tablename> - If you were to have for example, the book table as defined here, with a whole bunch of different attributes and what not, then each column in that table is the attribute, and then each of the rows is an entry with each attribute filled out
- Running
select * from Bookwould then result in the display of ALL of the data inside of the table, meaning it will print out each of the given rows - You can also specify each of the columns that you would want individually, if say you do not want all of them by doing something like
select book_id, title, editions, price from Book, which will print out a new table for you that holds all of that information - The order also matches the order that you input into the table, so like it would go id, then title etc in the example above
- WHERE Clause this basically allows you to restrict the rows of the results that you get from your SELECT query
- The
WHEREclause always requires a predicate which is something that evaluates to true, false, or unknown - These are used basically in the search condition of the
WHEREclause - You can do something like
select book_id, title from Book WHERE book_id='B1'or something like that basically, notice that you do NOT need to specify the column data for each of the columns you want to select - The given written example uses the
=operator for the predicate of the WHERE clause, but it can be done with more mathematical operations like the ones above
- Retrieving rows from a table, basically if you have a database and what not, you want to be able to access it, and this is exactly where the
-
COUNT, DISTINCT, LIMIT:
-
A Few Useful Expressions in tandem with SELECT Statement
-
-
COUNTwhich is a built in database function that retrieves the number of rows in the database that match the criteria, giving you a solid number -
So you can do something like
select COUNT(*) from <tablename>which would then give you the total number of rows in a given database table -
You can also give specific row using the SELECT and WHERE commands, so:
-
select COUNT(COUNTRY) from MEDALS where COUNTRY = 'Canada'which would given you the number of rows in a table called MEDALS in which the attribute value for the column COUNTRY is equal to ‘Canada’ -
DISTINCTwhich is used to remove duplicate values from a result set, and basically do something like retrieve unique values in a column -
So
select DISTINCT <columnname> from <tablename> -
so basically, if you have something like a country that has a received multiple gold medals, you can see how many DIFFERENT or DISTINCT instances of a country receiving a gold metal happened
-
using something like
select DISTINCT COUNTRY from MEDALS where MEDALTYPE = 'GOLD' -
LIMITis used for restricting the number of rows retrieved from the database, and is very useful whenever you have a TON of data in one table -
so like
select * from <tablename> LIMIT 10which would only get the first 10 options in a table, and this can obviously be used for the WHERE command as well
-
-
-
INSERT Statement:
- After a table is created, it needs to obviously be populated with data from someone that is trying to get their data stored
- You can do exactly this using the
INSERTstatement, which is used to add new rows into a table - If you want to add in data into the author table pictured above, you can use the insert statement using the following syntax
INSERT INTO AUTHOR (Author_ID, LastName, FirstName, Email, City, Country) VALUES ('A1','Chong','Raul','[email protected]','Toronto','CA')- This basically specifies the given table that you want to insert data into, and then also allows you to specify exact values that you might want to input with that statement
- It is important that the number of values inside of the VALUES section of the code matches the number of columns that you specified as well
- If I am not mistaken, you can also basically not fill in some of the schema portions of the columns, and if they allow that, they will fill in with a null value or something of the sort
- So if you have no email or something it will just be blank or default or something like that and you can just not add it in the INSERT statement
- Note that some languages let you insert multiple rows through the use of just another indentation after the values clause, where you specify the data for another row that you wish to insert
- This can obviously be done programmically as well as I did in the MidasCloud Project
-
UPDATE and DELETE Statements:
-
Not only would you want to access the data, or put in new data whenever you have a database, but it is very likely that you would also then want to modify and delete the data as well
-
-
You can alter the data inside of a given table using the
UPDATEstatement, which is another DML (Data Manipulation Language Statements) -
You can alter the data using something like
UPDATE <tablename> SET <columnname>=<value> WHERE <condition> -
So for the above table you would use something like
UPDATE authors SET City="New York" WHERE author_id='A1' -
This in turn would change the value of the attribute “Toronto” in the City column of the table for the author with the given id of “A 1”
-
This basically lets you change very specific things inside of your table
-
You can also update MULTIPLE different attributes of the table at once by just specifying more attributes in your given command, so after SET you might want to change the last name and first name and can do so with
-
UPDATE author SET lastname="A" firstname="B" WHERE author_id='A11which would change both of the attributes in the “A 1” row immediately to A and B respectively -
Without the
WHEREstatement, this MAKES THE CHANGE FOR ALL ROWS IN THE TABLE, so every single first and last name in the table would be changed -
To delete a given row, you use the
DELETEstatement, and would do so with -
DELETE FROM <tablename> WHERE <condition>and would allow you to delete every single given row that would match the condition -
You can also without the WHERE clause, and this would DELETE EVERY SINGLE ROW IN THE TABLE so be careful
-
-
Module 1 Lesson 2 Summary:
- Structured Query Language, or SQL, is used for querying and managing data.
- SQL is useful for handling structured data or data incorporating relations among entities and variables.
- The SQL SELECT statement retrieves data from a relational database table.
- The SELECT statement is a query, and the output we get from executing this query is a Result Set or a Result Table.
- In its simplest form, the syntax for a SELECT statement is: SELECT * from TableName
- The SQL INSERT statement inserts data into a relational database table by adding rows.
- The syntax of the INSERT statement is: INSERT INTO TableNameColumnName VALUES (values)
- For the INSERT statement, the values provided in the Values clause must equal the number of column names specified in the Column Name list. This ensures that each column has a value.
- The SQL UPDATE statement is used to read and modify data.
- The syntax of the UPDATE statement is as follows: UPDATE [TableName] SET ColumnName]=[Value <WHERE [Condition]>
- The SQL DELETE statement is used to remove data from a table.
- The syntax of the DELETE statement is: DELETE FROM [TableName] <Where [Condition]>
- The WHERE clause specifies the rows in a table that will be acted on by a SQL statement such as SELECT, DELETE, or UPDATE.
==Creating Tables, Sorting Results, and Join
-
CREATE Table Statement:
CREATEis used to basically make a table for the first time inside of a given relational database- The syntax for the command is as follows:
CREATE TABLE <table_name> ( column_name_1 datatype optional_parameters, column_name_2 datatype optional_parameters, column_name_2 datatype optional_parameters, )-
This basically creates the columns and attributes for the table, and has a few things inside of it like the datatype that the table can hold, as well as extra stuff that is down further below in the notes
-
This specifies only the columns and does not populate the table with any data, just the schema for the table
-
-
In the example you create a new table named provinces that has two different attributes
-
the first one is the id attribute, and is of datatype
char(2)which means its basically 2 chars, meaning it can only be a string of two characters in length (or basically 2 bytes of data) ((sigh, depends on encoding if it actually is 2 bytes)) -
It also then has the attributes of
PRIMARY KEY NOT NULL, which defines it as the primary key for this table, and that it has to have some sort of value, which is very common with something like an ID -
There is also then then name attribute which has only the given data type of
varchar(24), which is a character string of a variable length, and the maximum size that is its allowed to be is 24 characters -
-
-
The above hand is the library database which shows a ton of different database tables in conjunction and relation to one another
-
You would create them with the given PRIMARY keys and what not, and keep in mind PRIMARY KEYS ARE UNIQUE FOR EACH ROW IN A GIVEN TABLE, and are a UNIQUE IDENTIFIER
-
You would so I assume be able to assign a foreign key as well so you can have relation to another table inside of your table’s creation, letting you query another table and what not
-
ALTER, DROP, and Truncate Tables:
ALTERtable statement is basically used in order to add or remove columns inside of your table- This lets you alter the attributes that you have going on inside of your table, so if you need to add in something new to keep track of, then you can
- This does not only apply to completely new columns, but can also edit the current columns structural requirements and architecture as well
- The general syntax would be something like
ALTER TABLE table_name ADD COLUMN column_name_1 datatype;- Which you can obviously add in multiple different data types at different intervals and what not
- Keep in mind, that differently to the create table statement, you DO NOT use parenthesis when trying to use the ALTER table statement
- To then do something like alter the data type of a column you might do something like the following
ALTER TABLE table_name ALTER COLUMN column_name SET DATA TYPE <datatype>;- Which as previously mentioned, allows you to change the type and optional parameters of your column
- You do have to be careful with this however, because altering a datatype of a column whenever the current data does not match that type would cause issue.
- Instead of
ALTERyou can also then use theDROPkeyword in order to remove a specific column from the table DROP TABLEcan also then be used in order to drop a table- You can also however use
TRUNCATE TABLEin order to drop all of the data inside of the table, and generally this does basically the exact same thing as theDELETE FROM tablename;statement, but generally it is quicker to truncate the table
-
Sorting Result Sets:
- Sorting Result Sets basically gives you back the entire thing that you would query for but in an actually ordered way that you can interpret much easier
- The standard select statement gives you the above output, and it gives it to you in a way that is very decipherable, but it does not sort it for you at all
- Sorting though makes it easier for you to do something like say sort it in alphabetical order or something like that, so you as a human can get through it much quicker
- You can do this with the
ORDER BYClause - You can basically do something like
select title from Book ORDERED BY title - Which, by default, would sort the set in ascending order in an alphabetical or numerical manner
- However you can add in the
DESCkeyword at the end of the query and it would reverse the order in which your result is sorted - By having something like
ORDER BY 2would then actually sort the outputted set by the second column that you had specified in your select query
-
Join Overview:
JOINoperator is basically used to combine rows from two or more tables, and is based on the sort of key relationship that was described above- Given the dynamic nature of how you can retrieve the data from the different tables that you might have, it means that the result table might be generated in multiple different ways
- A
JOINoperator combines the rows of two different tables based on the condition and correlation of the two different sets of columns from both tables - Basically a summary of the two different keys that make relations to tables inside of a relational database structure
- Therefore, if you wanted to
JOINthese two tables, you would need the borrow_id primary key and foreign key inside of the two tables, allowing to combine then using theJOINkeyword, which they really haven’t shown the syntax for or anything really
-
Module 1 Lesson 3 Summary:
- CREATE, ALTER, TRUNCATE, and DROP define, change, or drop database objects such as tables.
- The CREATE TABLE statement includes the definition of attributes of columns in the table, including:
- Names of columns
- Datatypes of columns
- Optional values, if required, such as the Primary Key constraint
- The ORDER BY clause is used in a SQL query to sort the result set by a specified column. For example, “ORDER BY title” sorts the result set by the column named “title.”
- You can also specify the sort of column by indicating the column sequence number. For example, “select title, pages from book ORDER BY 2” indicates that the sort order is based on the values in the second column.
- The JOIN operator combines rows from two or more tables based on a relationship between certain columns in these tables.
- The tables being joined are related by a common column, which is usually the primary key of one table and appears as a foreign key in the other table.
- The Primary Key of a relational table uniquely identifies each row in a table.
- A Foreign Key is a set of columns referring to a primary key of another entity.
- If you need to combine data from three or more different tables, add new tables to the joins. First, you combine table A and table B information by matching their shared attributes. Then, you join the information from table B and table C by matching their shared attributes.
- SQL offers several types of JOINs - such as INNER JOIN and OUTER JOIN. You can extract a data set corresponding to the intersection of the two tables involved or choose a bigger data set.
==Summary
- Structured Query Language, or SQL, was designed to manage data in relational databases and is useful for handling structured data.
- Data is a collection of facts in words, numbers, and pictures.
- A database is a repository of data that provides functionality for adding, modifying, and querying data.
- Relational databases store tabular data as collections of related items, with columns containing item properties.
- The basic SQL statements are CREATE TABLE, INSERT, SELECT, UPDATE, and DELETE.
- Non-relational databases provide a flexible and scalable approach to storing and retrieving data.
- Relational databases are ideal for the optimized storage, retrieval, and processing of large volumes of data.
- RDBMS is a mature and well-documented technology, providing flexibility, reduced redundancy, ease of backup and disaster recovery, and ACID compliance.
- An Entity-Relationship model is a tool for designing relational databases. Entities become tables, and attributes are translated into columns.
- CREATE, ALTER, TRUNCATE, and DROP define, change, or drop database objects such as tables.
- The CREATE TABLE statement includes the definition of attributes of columns in the table, including:
- Names of columns
- Datatypes of columns
- Optional values, if required, such as the Primary Key constraint
- The ORDER BY clause is used in an SQL query to sort the result set by a specified column. For example, “ORDER BY title” sorts the result set by the column named “title.”
- You can also specify the sort of column by indicating the column sequence number. For example, “select title, pages from book ORDER BY 2” indicates that the sort order is based on the values in the second column.
- The JOIN operator combines rows from two or more tables based on a relationship between certain columns in these tables.
- The tables being joined are related by a common column, which is usually the primary key of one table and appears as a foreign key in the other table.
- The Primary Key of a relational table uniquely identifies each row in a table.
- A Foreign Key is a set of columns referring to a primary key of another entity.
- If you need to combine data from three or more different tables, add new tables to the joins. First, you combine table A and table B information by matching their shared attributes. Then, you join the information from table B and table C by matching their shared attributes.
- SQL offers several types of JOINs - such as INNER JOIN and OUTER JOIN. You can extract a data set corresponding to the intersection of the two tables involved or choose a bigger data set.
==Cheat Sheet
| Package/Method | Description | Code Example |
|---|---|---|
| SELECT | Retrieves data from one or more tables based on specified columns. | SELECT column1, column2 FROM table_name; |
| FROM | Specifies the table from which data is retrieved. | SELECT column1, column2 FROM table_name; |
| WHERE | Filters data based on specified conditions. | SELECT column1, column2 FROM table_name WHERE condition; |
| ORDER BY | Sorts the result set based on specified columns in ascending or descending order. | SELECT column1, column2 FROM table_name ORDER BY column1 ASC; |
| GROUP BY | Groups rows based on a specified column. | SELECT column1, COUNT(*) FROM table_name GROUP BY column1; |
| HAVING | Filters grouped data based on specified conditions. | SELECT column1, COUNT() FROM table_name GROUP BY column1 HAVING COUNT() > 1; |
| INSERT INTO | Inserts data into a table. | INSERT INTO table_name (column1, column2) VALUES (value1, value2); |
| UPDATE | Modifies data in a table based on specified conditions. | UPDATE table_name SET column1 = value1 WHERE condition; |
| DELETE FROM | Deletes data from a table based on specified conditions. | DELETE FROM table_name WHERE condition; |
| JOIN | Combines rows from multiple tables based on related columns. | SELECT column1, column2 FROM table1 JOIN table2 ON table1.column = table2.column; |
| INNER JOIN | Returns only matching rows from both tables. | SELECT column1, column2 FROM table1 INNER JOIN table2 ON table1.column = table2.column; |
| LEFT JOIN | Returns all rows from the left table and matching rows from the right table. | SELECT column1, column2 FROM table1 LEFT JOIN table2 ON table1.column = table2.column; |
| RIGHT JOIN | Returns all rows from the right table and matching rows from the left table. | SELECT column1, column2 FROM table1 RIGHT JOIN table2 ON table1.column = table2.column; |
| FULL JOIN | Returns all rows from both tables, regardless of the match. | SELECT column1, column2 FROM table1 FULL JOIN table2 ON table1.column = table2.column; |
| DISTINCT | Returns unique values from a column. | SELECT DISTINCT column1 FROM table_name; |
| COUNT | Counts the number of rows or non-null values in a column. | SELECT COUNT(*) FROM table_name; or SELECT COUNT(column1) FROM table_name; |
| SUM | Calculates the sum of values in a column. | SELECT SUM(column1) FROM table_name; |
| AVG | Calculates the average value of a column. | SELECT AVG(column1) FROM table_name; |
| MAX | Finds the maximum value in a column. | SELECT MAX(column1) FROM table_name; |
| MIN | Finds the minimum value in a column. | SELECT MIN(column1) FROM table_name; |




















