categories: computer science
Hello everyone,
Below you will find a video with a detailed explanation of the statements and keywords: SELECT, YEAR, AS, MONTH, DAY, WEEKDAY, DATEDIFF, DATEADD, FROM, WHERE, i.e. date 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 Id,
YEAR(DataP) AS Rok,
MONTH(DataP) AS Miesiac,
DAY(DataP) AS Dzien,
WEEKDAY(DataP, 2) AS NazwaDnia,
DATEDIFF('d', DataP, DataK) AS IleMinelo,
DATEADD('m', 5, DataK) AS Koniec
FROM srednia
WHERE YEAR(DataP) = '2023';
Statements: SELECT, YEAR, AS, MONTH, DAY, WEEKDAY, DATEDIFF, DATEADD, FROM, WHERE
Query 2:
SELECT Id, Srednia
FROM srednia
WHERE srednia.Srednia IN (5.1, 5.2, 5.3, 5.4, 5.5)
AND DataP BETWEEN #2023-02-01# AND #2023-02-05#;
Statements: SELECT, FROM, WHERE, IN, AND, BETWEEN
Video:
Thank you for reading!
Read more