Skip to content

Instantly share code, notes, and snippets.

View bevsxyz's full-sized avatar

Bevan Stanely bevsxyz

View GitHub Profile
CREATE TABLE Subscriptions (
CustomerID INT,
StartDate DATE,
EndDate DATE
);
INSERT INTO Subscriptions (CustomerID, StartDate, EndDate) VALUES
(1, '2024-01-01', '2024-03-31'),
(1, '2024-04-01', '2024-06-30'),
(1, '2024-08-01', '2024-10-31'),
CREATE TABLE InventoryStatus (
ProductID INT,
StatusDate DATE,
InStock BOOLEAN
);
INSERT INTO InventoryStatus (ProductID, StatusDate, InStock) VALUES
(1, '2024-06-25', 1),
(1, '2024-06-26', 1),
(1, '2024-06-27', 0),
CREATE TABLE Loan (
EMI_No INT,
DueDate DATE,
PaymentDate DATE,
Amount DECIMAL(10, 2),
Default_Status INT
);
INSERT INTO Loan (EMI_No, DueDate, PaymentDate, Amount, Default_Status) VALUES
(1, '2024-01-01', '2024-01-01', 1000.00, 0),