SQL INTERVIEW QUESTION | Hotel Booking Management

 DROP TABLE IF EXISTS Bookings;


CREATE TABLE Bookings (

    BookingID INT PRIMARY KEY,

    BookingDate DATE,

    RoomNumber INT

);


-- Sample data

INSERT INTO Bookings VALUES

(1, '2024-01-01', 101),

(2, '2024-01-02', 101),

(3, '2024-01-04', 101),

(4, '2024-01-01', 102),

(5, '2024-01-05', 102);



SELECT * FROM Bookings

Comments

Popular posts from this blog

50 Essential SQL Questions to Land Your Dream Job

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

ACCENTURE SQL INTERVIEW QUESTION | Change the ProductIDs