Formation initiation aux requêtes SQL
Compliance to the business - Methods / Technical handling
Goals : This training will teach trainees to:
- Understand the principle and content of a relational database
- Create queries to extract data according to different criteria
- Perform queries with joins, to retrieve information from multiple tables
- Use simple calculations and data aggregations
- Combine the results of several queries
Profile targeted
Suitable for all
Requirements
None
Introduction
1. Introduction to databases
- What is a database?
- How to manage and exploit these data
- Reading a relational model.
- Composition of a table. Notion of columns and types.
- Primary key and uniqueness.
- Notion of referential integrity.
- Tool to query a database.
2. Extract data from a table
- Extraction query
- The values to return.
- The WHERE clause to filter the data.
- The absence of a value
- Return rows without duplicates restriction operators (BETWEEN, IN, LIKE...).
3. Query data from several tables
- Principle of joins: restore information from several tables.
- Internal join and external join.
- The "natural" join and its difficulties.
- Set operators (UNION, INTERSECT...).
- Introduction to views: principle and interest
4. Scheduling and statistics
- Find aggregated values (MIN, MAX, AVG, SUM...).
- Compute relative aggregates with GROUP BY. - Filter aggregated values with HAVING
5. Present / sort data
- Present column data with aliases.
- Convert from one type to another.
- Make choices using the CASE operator.
- Sort data with ORDER BY. Operations on strings, on dates
6. Subqueries
- What is a subquery?
- The different types of results.
- List subqueries and IN, ANY/SOME and ALL operators
Teaching methods
- Theory
- Practical training
- Feedback
Terms of evaluation
- Practical work
Upcoming sessions
Dates and locations will follow
Length
Length: 2 days (14h of training)
Rate
On-demand