Consider the following table and write the output of the following SQL Queries.
Table : ORDERS
| 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:
I. SELECT CUSTOMERNAME FROM ORDERS WHERE DISCOUNT IS NOT NULL;
II. SELECT CUSTOMERNAME, DISCOUNT FROM ORDERS WHERE DISCOUNT BETWEEN 5 AND 10;
III. SELECT MONTHNAME(ORDERDATE) FROM ORDERS WHERE ORDERDATE IS NOT NULL;
IV. SELECT ORDERID, DAY(ORDERDATE) FROM ORDERS;
State whether the following statement is True or False:
In Pandas Series, the Positional index can be a string or an integer.
We can add a new row to a DataFrame DF using the ______ method.
Naveen discarded various types of waste material without realizing that e-waste contains harmful substances that could pollute the environment. He wants to know which of the following will be considered as e-waste?
In which scenario is a bar chart preferred over a line chart?
Which of the following network topology uses a central cable (backbone) to connect all devices?
What will be the result of the following SQL command?
SELECT LENGTH('Data Base');(Note: There is single space between the words Data and Base.)
State whether the following statement is True or False:
The INSTR(stringl, string2) function in SQL returns 0 if string2 is not present as a substring in string1.
What will be the result of the following SQL command?
SELECT ROUND(15.678, 2);Write SQL queries to perform the following:
(I) Display the month (in numeric form) of the date '2026-01-01'.
(II) Display only the year part from the date '2026-01-01'.
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:
Table : Guest
| 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:
I. Display last 3 characters of guest name in upper case.
II. Display the name of the guest along with the day name of check-in date.
III. Display the remainder when charges are divided by 1000.
IV. Extract and display three characters, starting from the second character, of each guest name.