Class Xii Ip Practical File 2020 21
Class Xii Ip Practical File 2020 21
1) Display Salesman name , bonus after rounding off to zero decimal places.
Select SNAME, round(BONUS,0) from SALESMAN;
2) Display name, total salary of all salesman after addition of salary and
bonus and truncate it to 1 decimal places.
Select sname, truncate((SALARY+BONUS),1) from SALESMAN;
3
Page
3) Display remainder of salary and bonus of Salesman whose SNO starting
with ‘A’
Select MOD(SALARY,BONUS) from SALESMAN where SNO like ’A%’;
4
Page
6) Display last 5 characters of name of SALESMAN.
Select sname, right(Sname,5) from SALESMAN;
6
Page
Database query using SQL (Aggregate functions ,Group
by ,order by query in SQL)
1. Display the average price of each type of vehicle having quantity more than
20.
Select Type, avg(price) from vehicle where qty>20 group by Type;
7
Page
3. Display total price of all types of vehicle.
Select Type, sum(Price* Qty) from Vehicle group by Type;
10
Page