This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* 1 | |
| SELECT name, price, quantity, category, discount, discountPercentage, price * quantity as [можливий дохід за хліб та молоко], (price * quantity) * (discountPercentage * 0.01) as [можливий дохід за хліб та молоко з урахуванням знижок] | |
| FROM productTable | |
| WHERE category IN (N'Bakery', N'Dairy') */ | |
| /* 2 | |
| SELECT name, price, quantity, date_of_delivery | |
| FROM productTable | |
| WHERE quantity > 10 AND date_of_delivery >= DATEADD(DAY, -1, CAST(GETDATE() AS DATE)) AND date_of_delivery >= DATEADD(DAY, 1, CAST(GETDATE() AS DATE)) */ | |
| /* 3 | |
| SELECT name, price, quantity, date_of_delivery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE [master] | |
| GO | |
| /****** Object: Database [productDatabase] Script Date: 12/18/2025 5:20:11 AM ******/ | |
| CREATE DATABASE [productDatabase] | |
| CONTAINMENT = NONE | |
| ON PRIMARY | |
| ( NAME = N'productDatabase', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\productDB.mdf' , SIZE = 15360KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) | |
| LOG ON | |
| ( NAME = N'productDatabase_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\productDBlog.ldf' , SIZE = 5120KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) | |
| WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE [master] | |
| GO | |
| /****** Object: Database [productDatabase] Script Date: 12/18/2025 4:37:13 AM ******/ | |
| CREATE DATABASE [productDatabase] | |
| CONTAINMENT = NONE | |
| ON PRIMARY | |
| ( NAME = N'productDatabase', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\productDB.mdf' , SIZE = 15360KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) | |
| LOG ON | |
| ( NAME = N'productDatabase_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\productDBlog.ldf' , SIZE = 5120KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) | |
| WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE [master] | |
| GO | |
| /****** Object: Database [productDatabase] Script Date: 12/16/2025 6:11:33 PM ******/ | |
| CREATE DATABASE [productDatabase] | |
| CONTAINMENT = NONE | |
| ON PRIMARY | |
| ( NAME = N'productDatabase', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\productDB.mdf' , SIZE = 15360KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) | |
| LOG ON | |
| ( NAME = N'productDatabase_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\productDBlog.ldf' , SIZE = 5120KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) | |
| WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| USE [master] | |
| GO | |
| /****** Object: Database [favMusic] Script Date: 12/11/2025 7:24:11 PM ******/ | |
| CREATE DATABASE [favMusic] | |
| CONTAINMENT = NONE | |
| ON PRIMARY | |
| ( NAME = N'favMusic', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\music.mdf' , SIZE = 15360KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) | |
| LOG ON | |
| ( NAME = N'favMusic_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\musicLog.ldf' , SIZE = 5120KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) | |
| WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF |