Write suitable SQL query for the following:
I. To display only the date part from the date/time expression '2026-01-01 10:10:10'
II. To convert all customer names from the Cust_Name column to lowercase in the Customer table.
III. To extract the first 4 characters from the City_Name column in Location table.
IV. To display the name of the city from the CITY column in EVENT table, after removing leading spaces.
V. To find the average salary from Salary column in Employees table.
SELECT DATE('2026-01-01 10:10:10'); SELECT LOWER(Cust_Name) FROM Customer; SELECT LEFT(City_Name, 4) FROM Location; SELECT LTRIM(CITY) FROM EVENT; SELECT AVG(Salary) FROM Employees; (a) What is data protection?
(b) Mention any two precautionary measures one can take to avoid the risk of cybercrime.
Consider the DataFrame Scholarship shown below:
| Name | Course | Amount | |
|---|---|---|---|
| 0 | Ananya | B.Sc. | 62000 |
| 1 | Karan | B.Tech | 67000 |
| 2 | Simran | MCA | 64000 |
| 3 | Rahul | BCA | 70000 |
| 4 | Priya | BA | 69000 |
Answer the following questions:
Write suitable SQL query for the following:
I. To display the value of 172.
II. To display the day part of the dates in the Hire_Date column of the Employee table.
III. To display the maximum value of the Bill_Amount column in the Bill table.
IV. To remove leading and trailing spaces from the Location column in the Branch table.
V. To display total salary from tot_sal column in Employees table.
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 |
(I) Which attribute(s) can be considered as the Candidate keys(s)? Justify your answer.
(II) Write an SQL query to insert a new record with the following values: BookId: 501, Title: AI for ALL, Genre: Technology, Price: 589
(III) Write an SQL query to add a new column Author that is a character data type of size 20.
(i) Write an SQL statement to create a table named PRODUCTS with the following specifications:
| Column Name | Data Type | Key |
|---|---|---|
| PID | Integer | Primary Key |
| PName | Varchar of size 30 | |
| PCat | Char of size 15 | |
| Price | Decimal Number |
(ii) Write an SQL query to increase the price of all items by 100, whose product category is Grocery, in the table PRODUCTS.
Write suitable SQL query for the following:
I. To display the value of 172.
II. To display the day part of the dates in the Hire_Date column of the Employee table.
III. To display the maximum value of the Bill_Amount column in the Bill table.
IV. To remove leading and trailing spaces from the Location column in the Branch table.
V. To display total salary from tot_sal column in Employees table.
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.
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;
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'.
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.
(a) What is data protection?
(b) Mention any two precautionary measures one can take to avoid the risk of cybercrime.

The electric potential for various points in $x$-$y$ plane is given by $V = 1.0 x^2 - 2.0 y^2$, where $V$ is in volts and $x$, $y$ are in metres. The angle that the electric field at point $(2.0$ m$, 1.0$ m$)$ makes with the positive $x$-axis is: