| 12 | |
| 13 | {{{ |
| 14 | INSERT INTO Procurement (TransactionID, EmployeeID, CustomerID, ProductID, ProcurementDate, Quantity) |
| 15 | VALUES (3, 1, 2, 3, '2025-05-04', 1); |
| 16 | }}} |
| 17 | |
| 18 | {{{ |
| 19 | INSERT INTO T_Type (TransactionID, Type, Duration, MonthlyPay, TotalPrice) |
| 20 | VALUES (3, 'Buy', NULL, NULL, 30000.00); |
| 21 | }}} |
| 22 | |
| 23 | * Преглед на извршени трансакции. |
| 24 | |
| 25 | {{{ |
| 26 | SELECT |
| 27 | c.CustomerName, |
| 28 | c.CustomerSurName, |
| 29 | p.Model AS TruckModel, |
| 30 | tt.TotalPrice, |
| 31 | pr.ProcurementDate |
| 32 | FROM |
| 33 | Procurement pr |
| 34 | JOIN Customer c ON pr.CustomerID = c.CustomerID |
| 35 | JOIN Product p ON pr.ProductID = p.ProductID |
| 36 | JOIN T_Type tt ON pr.TransactionID = tt.TransactionID |
| 37 | WHERE |
| 38 | tt.Type = 'Buy'; |
| 39 | }}} |