Professional Documents
Culture Documents
Week 09 - Tutorial Lab Sheet DQL
Week 09 - Tutorial Lab Sheet DQL
Akila Warnapura
ITE 2422 - Database Management Systems Lecture Name:
Akila Warnapura Data Query Language (DQL)
Learning Outcomes
§ After completing this tutorial, you will learn about
Advanced data retrieval using Data Query Language (DQL)
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Structured Query Language Commands
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval- SQL Joins
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval- SQL Joins
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval- SQL Joins
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval- SQL Joins
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval- SQL Joins
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval
SUM() - Returns the total value of a column in a database table. ITE 2422 - Database
MIN() - Returns the minimum value of a column in a database table.
Management Systems
MAX() - Returns the maximum value of a column in a database table.
AVG() - Returns the average value of a column in a database table. Akila Warnapura
COUNT() - Returns the number of rows in a database table.
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval
Nested Queries
A query that is contained within another SQL query and is incorporated into the WHERE
clause is referred to as a Subquery, Inner query, or Nested query.
The data that is returned from a subquery is then incorporated into the main query as a
condition to further restrict the amount of data that is retrieved from the database.
Akila Warnapura
Lecture Name:
Data Query Language (DQL)
Advanced Data Retrieval
Akila Warnapura
Lecture Name:
Data Query Language (DQL)