SECTION A
1. Write a menu driven program to operate on a csv file courier.csv with each record as a list of the
form :
[courier_id, name, city, fees].
The menu should
a) Insert records into the file.
b) Display records, the total of the fees and the average fees
c) Search and display the details of a given courier_id
2. Your Principal has chosen you to to help maintain the records of grade 12 students in a stack format.
Each record should contain { ‘s_id’:int, ‘s_name’:str , ‘s_marks’: int}
You decide to implement stack data structure to maintain the records of your classmates to perform the
following operations on the stack , in a menu driven fashion
i) Push
ii) Pop
iii) Display (at the end of the display , print the average marks of the students, and the topper’s details)
SECTION B
3.Consider the following table:
Write SQL Queries to create the above tables and insert records into them, and write queries for
the following:
a) To display employee ids, names of employees, job ids with corresponding job titles.
b) To display names of employees, sales and job titles who have achieved sales more than 1300000.
c) To display names who have ‘SINGH’ (anywhere) in their names.
d) Write SQL command to change the jobid to 104 of the employee with ID as E4 in the table
Employee.
e) Display a list of jobid, job name and number of employees
f) Display only the jobs with salary greater than or equal to the average salary.
g) Increase “manager” salary by 5 percent.
No comments:
Post a Comment