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 [Store3] Script Date: 10.02.2025 12:01:41 ******/ | |
CREATE DATABASE [Store3] | |
CONTAINMENT = NONE | |
ON PRIMARY | |
( NAME = N'Store3', FILENAME = N'E:\STEP\C_sharp .Net\SQL\Store\Store3.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) | |
LOG ON | |
( NAME = N'Store3_log', FILENAME = N'E:\STEP\C_sharp .Net\SQL\Store\Store3_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) | |
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 [Store3] Script Date: 08.02.2025 10:34:47 ******/ | |
CREATE DATABASE [Store3] | |
CONTAINMENT = NONE | |
ON PRIMARY | |
( NAME = N'Store3', FILENAME = N'E:\STEP\C_sharp .Net\SQL\Store\Store3.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) | |
LOG ON | |
( NAME = N'Store3_log', FILENAME = N'E:\STEP\C_sharp .Net\SQL\Store\Store3_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) | |
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
-- 1. Посчитать возможную выручку за хлеб и молоко (с учётом скидок на эти товары) | |
--SELECT *,(price * quantity - price*discount)[Цена с учетом скидки] | |
--FROM Store_table | |
--WHERE name LIKE '%хлеб%' OR name LIKE '%молоко%' | |
--2. Получить информацию о том, каких товаров вчера и сегодня доставили более 10 штук (getdate, dateadd) | |
--SELECT * | |
--FROM Store_table | |
--WHERE (date_of_delivery = CAST (GETDATE() AS DATE) OR date_of_delivery = CAST (DATEADD(DAY, -1, GETDATE()) AS DATE)) AND quantity>300 -- у меня все были больше 10 штук |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
setlocale(0, "UKR"); | |
//1) Вывести на экран консоли надпись : | |
cout << "\"To be \n\tor not\n\t\tto be...\"\n\t\t\t/Shakespeare/\"\n\n"; |
NewerOlder