dddf
dddf
Informatics Practices
By: Arush Gupta
Class XI NM B
BCM Arya Model Sr. Sec. School
a. Display all the records (all columns) from the employee table.
SELECT * FROM Emp;
a. Display all the records (all columns) from the employee table.
SELECT * FROM Emp;
d. To display the employee name and the incremented value of SAL as SAL
+ 300.
SELECT EName, Sal + 300 AS IncrementedSalary FROM Emp;
e. To list the employee name and its annual salary (Annual salary = 12 *
Sal + 100).
SELECT EName, (12 * Sal + 100) AS AnnualSalary FROM Emp;
j. Display employee name and salary of those employees who don’t have
their salary in the range of 25000 to 40000.
SELECT EName, Sal FROM Emp WHERE Sal NOT BETWEEN 25000 AND
40000;
o. Display the name of employees who have 'L' as any alphabet of their
name.
SELECT EName FROM Emp WHERE EName LIKE '%L%';
p. Display the employee name and job of employees hired between Feb
20, 1991, and Dec 31, 1991.
SELECT EName, Job FROM Emp WHERE Hiredate BETWEEN '1991-02-
20' AND '1991-12-31';
r. List the EName and salary of all the employees who earn more than
1200 and are in department 10 or 40.
SELECT EName, Sal FROM Emp WHERE Sal > 1200 AND DeptNo IN (10,
40);
s. List name and hiredate of all the employees who are hired in 1981.
SELECT EName, Hiredate FROM Emp WHERE Hiredate LIKE '1981%';
w. To list the names and jobs of all employees who work in department
20 and their manager is 7788.
SELECT EName, Job FROM Emp WHERE DeptNo = 20 AND Manager =
7788;
z. Display EName joined with Job with the heading "Employee, Sal * 12 as
'Total Salary'" from table Emp.
SELECT CONCAT(EName, ', ', Job) AS Employee, Sal * 12 AS TotalSalary
FROM Emp;
aa. Write a query to display EName and Sal of employees whose salary is
greater than or equal to 13000 from table Emp.
SELECT EName, Sal FROM Emp WHERE Sal >= 13000;
(ae) Display name, job, salary, and hire date of employees hired
between February 20, 1991, and May 1, 1991, in ascending hire
date order
(af) Display name and hire date of all employees hired in 1992
(am-i) Output the name and calculated annual income for Ashok
Singhal
Python
Program:
employee[name] = salary
print("\n\nEMPLOYEE_NAME\tSALARY")
for k in employee:
Program:
for ch in st:
if ch in dic:
dic[ch] += 1
else:
dic[ch] = 1
Program:
# Program to convert a number entered by the user into its corresponding number
in words
numberNames = {
result = ''
for ch in num:
value = numberNames[key]