Informatica 6, 7, 8

Informatica 6, 7, 8
1 / 8
next
Slide 1: Slide
InformatiemanagementWOStudiejaar 4

This lesson contains 8 slides, with interactive quiz and text slides.

Items in this lesson

Informatica 6, 7, 8

Slide 1 - Slide

6) WHERE
WHERE is used to filter data.
SELECT [Column Name]
FROM [Table Name]
WHERE [Condition];

Slide 2 - Slide

  • = Equal
  • > Greater than
  • < Less than
  • >= Greater than or equal
  • <= Less than or equal
  • <>/!= Not equal. 
  • BETWEEN, AND, OR, NOT

Slide 3 - Slide

Example!
I want to select all of the data about students that are 18 or older.
SELECT * FROM StudentsTable
WHERE Age >= 18;
StudentsTable

Slide 4 - Slide

8) ORDER BY
ORDER BY is used to sort selected data in ascending (ASC) or descending (DESC) order.
(If not specified it will be ASC by default.)
SELECT [Column Name]
FROM [Table Name]
ORDER BY [Column Name] ASC/DESC;

Slide 5 - Slide

Example!
SELECT * 
FROM StudentsTable
ORDER BY Age DESC;
StudentsTable

Slide 6 - Slide

SELECT _____ FROM StudentsTable

_________  _______;
Select all records from the StudentsTable, sort the result alphabetically by the column Lesson.


Lesson
ALL
ORDER BY
*
StudensTable

Slide 7 - Drag question

8) GROUP BY
The GROUP BY statement groups rows that have the same values into summary rows and often used with aggregate functions 
COUNT(), MAX(), MIN(), SUM(), AVG() to group the result-set by one or more columns.

Slide 8 - Slide