first commit

This commit is contained in:
Vitalii Litvinchuk
2026-05-04 23:15:09 +03:00
commit 6deed0469a
49 changed files with 5366 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#####################################################
###################### Task 1: ##################
1. Створіть SQL-функцію, яка виведе значення вартості (Cost) для угоди,
номер якої вкаже користувач при виклику фукнції.
2. Викличте функцію, використавши в якості вхідного параметра OrderID = 5.
USE Lucky_Shrub;
create function CalculateCost(order_id int)
returns int DETERMINISTIC
begin
declare v_cost int;
select Cost into v_cost from Orders where OrderID = order_id;
return v_cost;
end
set @OrderID = 8;
select CalculateCost (@OrderID);