Practical File 2024-2025
Practical File 2024-2025
Name:
Class:
Roll No:
INDEX
Employee table
Q3. Display the Salary, Zone, and Grade of all the employees.
Q4 Display the records of all the employees along with their annual salaries.
The Salary column of the table contains monthly salaries of the employees.
Q5 Display the records of all the employees along with their annual salaries.
The Salary column of the table contains monthly salaries of the employees. The
new column should be given the name “Annual Salary”.
Conditional Select using Where Clause
Q6. Display the details of all the employees who are below 30 years of age.
Q7 Display the names of all the employees working in North zone.
Q10Display the details of all the employees whose Grade is not NULL.
Q12 Display the various department numbers from the table Employee. A
.department number should be displayed only once.
Q14 Display the details of all the employees who are getting a salary of more than
. 35000 in the department 30.
Q15. Display the names and salaries of all the employees who are working neither in
West zone nor in Centre zone.
Q16 Display the names of all the employees who are working in department 20 or
. 30.
Q17. Display the details of all the employees whose salary is between 32000 and
38000.
Q18. Display the details of all the employees whose grade is between ‘A’ and ‘C’.
Using IN Operator
Q19. Display the names of all the employees who are working in department 20 or
30. (Using IN operator)
Q20. Display the names and salaries of all the employees who are working neither in
West zone nor in Centre zone. (Using IN operator)
Using BETWEEN Operator
Q21. Display the details of all the employees whose salary is between 32000
and 38000. (Using BETWEEN operator)
Q22. Display the details of all the employees whose grade is between ‘A’ and
‘C’. (Using BETWEEN operator)
Q24. Display the name, salary, and age of all the employees whose names end with
‘a’.
Q25. Display the name, salary, and age of all the employees whose names contain
‘a’
Q26. Display the name, salary, and age of all the employees whose names do not
contain ‘a’
Q27. Display the details of all the employees whose names contain ‘a’ as the second
character.
Q30. Display the details of all the employees in the ascending order of their grades
and within grades in the descending order of their salaries.
Q display details of those who have salary more than or equal to 30000 where
dept is 10
Q display name, zone and age of those who have age less than or equal to 28
Q Increase the salary of all the employees above 30 years of age by 10%.
update employee set salary=salary+(salary*10/100) where age<30;
Q Delete the records of all the employees whose grade is C and salary is below
30000.
Q Delete the records of all the employees of department 10 who are above 40
years of age.
delete from employee where dept=10 and age<40.
Q Add another column Hire Date of type Date in the Employee table.
alter table employee add hire date date.
DROP TABLE
Q Drop the tables Employee and department.
Drop table employee;
My SQL functions
Text/string functions
1) CONCAT
2) LOWER/LCASE
3) SUBSTR/MID
4) UCASE/UPPER
5) LTRIM
7) TRIM
8) INSTR
9) LENGTH
Numeric function
1) mod
2) POWER/POW
3) ROUND
Date/Time function
1) CURDATE () /CURRENT_DATE()
2 )MONTH()
3 )YEAR()
4 )DAY()
5) DATE ()
6) NOW ()
AGGREGATE FUNCTION
1) AVERAGE
2) COUNT
3) MAX
4) MIN
5) SUM
GROUPING BY+ HAVING BY
JOINT TABLE
Cross joint
Equi joint
Natural joint
Conditions
PYTHON
SERIES
A) CREATION OF SERIES
1) EMPTY SERIES
2) scalar value
3) list
4) Dictionary
5) numpy array
B) SERIES FUNCTION
1) head and tail function
2) sort index and sort values
2) INDEX NAME
3) VALUES
4) DTYPE
5) SHAPE
6) NBYTES
7) NDIM
8) SIZE
9) ITEMSIZE
10) HASNANS
11) EMPTY
12) NAME
3) Series
4) Dictionary of list
5) List of dictionaries
B) DATAFRAME FUNCION
1) HEAD
2) TAIL
C) DATAFRAME ATTRIBUTES
1)INDEX
3) COLUMN
3)AXES
4)DTYPE
5)SIZE
6) SHAPE
7) VALUES
8) EMPTY
9) NDIM
10) T
E) deleting/renaming rows/columns
GRAPHS
1) LINE GRAPH
2)MULTILINE GRAPH
3)BAR GRAPH
4) MULTIPLE BAR GRAPH