Ashutosh, who is a manager, has created a database to manage employee records. The database includes a table named EMPLOYEE whose attribute names are mentioned below:
EID : Stores the unique ID for each employee.
EMP_NAME : Stores the name of the employee.
DEPT : Stores the department of the employee.
SALARY : Stores the salary of the employee.
JOIN_DATE : Stores the employee’s joining date.
Write the output of the following SQL Queries:
(i) SELECT SUBSTRING(EMP_NAME, 1, 5) FROM EMPLOYEE WHERE DEPT = 'ENGINEERING';
(ii) SELECT EMP_NAME FROM EMPLOYEE WHERE MONTH(JOIN_DATE) = 8;
(iii) SELECT EMP_NAME FROM EMPLOYEE WHERE SALARY>60000;
(iv) SELECT COUNT(DEPT) FROM EMPLOYEE;
An educational institution is maintaining a database for storing the details of courses being offered. The database includes a table COURSE with the following attributes:
C_ID : Stores the unique ID for each course.
C_NAME : Stores the course’s name.
INSTRUCTOR : Stores the name of the course instructor.
DURATION : Stores the duration of the course in hours.
Write SQL queries for the following:
(i) To add a new record with following specifications:
C_ID : C106
C_NAME : Introduction to AI
INSTRUCTOR : Ms. Preeti
DURATION : 55
(ii) To display the longest duration among all courses.
(iii) To count total number of courses run by the institution.
(iv) To display the instructors’ name in lower case.
(A) Explain the following reactions and write chemical equations involved:
(a) Wolff-Kishner reduction
(b) Etard reaction
(c) Cannizzaro reaction
Gurkirat has to fill in the blanks in the given Python program that generates a line plot as shown below. The given line plot represents the temperature (in degree Celsius) over five days as given in the table:
Write the missing statements according to the given specifications:
(i) Write the suitable code to import the required module in the blank space in the line marked as Statement-1.
(ii) Fill in the blank in Statement-2 with a suitable Python function name to create a line plot.
(iii) Refer to the graph shown and fill in the blank in Statement-3 to display the appropriate label for x-axis.
(iv) Refer to the graph shown and fill in the blank in Statement-4 to display the suitable chart title.
Consider the following tables:
Write SQL queries for the following:
(i) To delete those records from table SALES whose UnitsSold is less than 80.
(ii) To display names of all products whose category is not known.
(iii) To display the product names along with their corresponding units sold.