(a) Shalini, who works as a database designer in the hotel industry, has created a table named Guest to keep track of guest details as shown below:
| GuestID | GuestName | RoomNumber | CheckInDate | Charges |
|---|---|---|---|---|
| G101 | Harish | 101 | 2025-04-03 | 3000 |
| G102 | Sunita | 101 | 2025-04-03 | 3000 |
| G103 | Ramesh | 102 | 2025-05-04 | 5000 |
| G104 | Bhumika | 103 | 2025-06-02 | 3500 |
Write a suitable SQL query for the following:
(a) Consider the following tables:
| TID | TName | Experience | City |
|---|---|---|---|
| 1 | Kartik | 5 | Bhopal |
| 2 | Shahnaz | 6 | Nagpur |
| 3 | Rajendra | 7 | Delhi |
| 4 | Tanvi | 4 | Bhopal |
| 5 | Alam | 9 | Delhi |
| SID | SubName | TID |
|---|---|---|
| 101 | Physics | 1 |
| 102 | Chemistry | 2 |
| 103 | Mathematics | 3 |
| 104 | Informatics Practices | 4 |
| 105 | Computer Science | 5 |
Write appropriate SQL query for the following:
(b) Consider the following table and write the output of the following SQL Queries:
| ORDERID | CUSTOMERNAME | TOTALAMOUNT | DISCOUNT | ORDERDATE |
|---|---|---|---|---|
| 101 | Hemant | 5000 | 10 | 2024-03-01 |
| 102 | Neha | 7000 | 15 | NULL |
| 103 | Keshav | 3000 | 5 | 2024-01-20 |
| 104 | Sandhya | 4500 | NULL | 2023-12-25 |
Write the output of the following SQL Queries:
Consider the table LIBRARY as given below:
| BookId | Title | Genre | Price |
|---|---|---|---|
| 101 | Python Basics | Technology | 278 |
| 201 | The Silent Patient | Fiction | 340 |
| 301 | Data Science | Technology | 291 |
| 401 | Oceans | Marine Life | NULL |