Computer Science

IT Exam Course | Databases #7


categories: computer science

Hello everyone,

Below you will find a video with a detailed explanation of creating queries in design view. 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 TOP 1 uczniowie.Imie, uczniowie.Nazwisko
FROM srednia
INNER JOIN uczniowie ON srednia.Id = uczniowie.IdUcznia
ORDER BY srednia.Srednia DESC;
              

design view 1

Statements: SELECT, TOP, FROM, INNER JOIN, ON, ORDER BY, DESC


Query 2:



SELECT TOP 3 LEFT([uczniowie].[Imie],1) + MID([uczniowie].[Nazwisko],1,1) AS ImieNazwisko,
srednia.Srednia
FROM srednia
INNER JOIN uczniowie ON srednia.Id = uczniowie.IdUcznia;
              

design view 2

Statements: SELECT, FROM, TOP, LEFT, MID, AS, INNER JOIN, ON


Query 3:



SELECT srednia.Srednia
FROM srednia
WHERE (((srednia.Srednia) > 4) AND ((MONTH(srednia!DataP)) = 2));
              

design view 3

Statements: SELECT, FROM, WHERE, AND, MONTH


Query 4:



SELECT TOP 1 uczniowie.klasa AS Klasa,
ROUND(AVG([srednia].[Srednia]),3) AS Srednia
FROM srednia
INNER JOIN uczniowie ON srednia.Id = uczniowie.IdUcznia
GROUP BY uczniowie.klasa
ORDER BY ROUND(AVG([srednia].[Srednia]),3) DESC;
              

design view 4

Statements: SELECT, TOP, AS, ROUND, AVG, FROM, INNER JOIN, ON, GROUP BY, ORDER BY, DESC


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