Computer Science

IT Exam Course | Databases #3


categories: computer science

Hello everyone,
Below you will find a video with a detailed explanation of the statements and keywords: SELECT, FROM, GROUP BY, SUM, MIN, MAX, AVG, AS, COUNT, i.e. aggregate functions in general. It covers how they work, their time complexity, and their usefulness. Below you will also find ready-to-copy code in case you need it.
Query 1:


SELECT SUM(Srednia) AS Suma
FROM srednia;
                

Statements: SELECT, SUM, AS, FROM


Query 2:



SELECT klasa
FROM uczniowie
GROUP BY klasa;
              

Statements: SELECT, GROUP BY, FROM


Query 3:



SELECT klasa, COUNT(klasa) AS Ile
FROM uczniowie
GROUP BY klasa;
                

Statements: SELECT, COUNT, GROUP BY, AS, FROM


Query 4:



SELECT klasa AS Klasa, COUNT(klasa) AS Ile
FROM uczniowie
GROUP BY klasa
HAVING COUNT(klasa) > 1;
                

Statements: SELECT, COUNT, GROUP BY, AS, FROM, HAVING


Query 5:



SELECT MAX(Srednia) AS [Max],
       MIN(Srednia) AS [Min],
       AVG(Srednia) AS [SredniaCalk],
       SUM(Srednia) AS [Suma]
FROM srednia;
                

Statements: SELECT, MAX, MIN, AVG, SUM, AS, FROM


Video:

Thank you for reading!


Read more
Administrator

This post was written by the administrator

Recent Posts

Proof Problems in Mathematics The Beginning Integrals, Course Practical Physics for Engineers IT Matura Course | Algorithms IT Matura Course | Databases IT Matura Course | Theory IT Matura Course | Spreadsheet

Archive

Year 2022

Comments