Содержание
- 2. Last lecture AS String Concatenation || DISTINCT IS NULL & IS NOT NULL Range condition: ,
- 3. Aggregate Functions SQL provides the following aggregate functions that appear in SELECT statement: Min() selects the
- 4. Aggregate Functions Example: Select the minimum, maximum and average gpa from the Students table. SELECT min(gpa),
- 5. Aggregate Functions Selecting count(*) or count(expression) returns the number of tuples that satisfy a selection condition.
- 6. Aggregate Functions Example: Get number of students with group_id = 1. The column should be named
- 7. Students table Count (*) Count (group_id) Count example
- 8. GROUP BY The aggregate functions can also be applied to subsets of tables. In SQL, rows
- 9. GROUP BY: example Example: Select the group_id’s that students study in and the number of students
- 10. GROUP BY: example Students table SELECT count(*) FROM Students;
- 11. GROUP BY: example Students table SELECT group_id, count(*) FROM Students GROUP BY group_id;
- 12. HAVING The HAVING clause is used to filtering groups This is similar to a selection condition
- 13. HAVING: example Query the group_id’s and number of students of each group. SELECT group_id, count(*) FROM
- 14. Example with join SELECT g.name as group_name, count(*) as number_of_students FROM Students s, Groups g WHERE
- 15. ORDER BY The ORDER BY clause is used to set the ordering of the resultant table.
- 16. Ordering Results in SQL: example • The ordering of results may be mixed in query: one
- 17. Example with join SELECT g.name as group_name, count(*) as number_of_students FROM Students s, Groups g WHERE
- 18. SELECT Statement SQL allows us to query data using select statements. Syntax: SELECT attribute(s) FROM table(s)
- 19. Complete SELECT Statement SELECT attribute(s) FROM table(s) [WHERE selection condition(s)] [GROUP BY condition(s)] [HAVING condition(s)] [ORDER
- 20. Select Statement Summary
- 21. String Functions and Operators
- 22. String Functions and Operators
- 23. Date Functions EXTRACT (field FROM source) EXTRACT function retrieves subfield such as year or hour from
- 24. Date Functions date_part (‘field’, source) Source must be a value expression of date type. Field is
- 25. Date Functions Fields: century year month week day decade quarter dow (the day of the week)
- 26. EXTRACT / date_part examples SELECT EXTRACT(year FROM bdate) FROM Students; SELECT date_part('year', bdate) FROM Students;
- 27. Date Functions CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP Example: SELECT CURRENT_DATE;
- 29. Скачать презентацию

















![Complete SELECT Statement SELECT attribute(s) FROM table(s) [WHERE selection condition(s)] [GROUP BY](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1073962/slide-18.jpg)








Superlatives
Super Clothes
Professions
New functionality
Word Perfect + Grammar Check Spotlight
I ___ at school
Диалог
Future of Russian Economy
Презентация к уроку английского языка "English meals" -
Do you like
Battaglia navale
Toy Shop
Предлоги времени в английском языке: in, on, at
Technology nouns and phrasal verbs
Презентация на тему Welcome to New York!
Portfolio
Second Conditional
Let’s help animals together! We are living on our planet and even don’t think about animals, birds, fish etc.
Places or stores fun activities games
Yesterday by bus
Spotlight 10
Презентация на тему Diet (Диета)
Simple sentence
Interactive english
Whose is this
All about recycling
Describing objects
Reported speech