Changes between Version 1 and Version 2 of Buy-Rent


Ignore:
Timestamp:
05/04/25 18:27:18 (13 days ago)
Author:
211301
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Buy-Rent

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