0% found this document useful (0 votes)
32 views2 pages

90 INFORMATIC PRACTICES 2022 COMP

Uploaded by

max12342732k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

90 INFORMATIC PRACTICES 2022 COMP

Uploaded by

max12342732k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PRACTICE PAPER : 1

1. Find the output of the following SQL queries : 2


(i) SELECT ROUND(21.341, 2);
(ii) SELECT MOD(10, 3);
2 Give any two differences between MOD() and AVG() functions in SQL.
3 Find the output of the following SQL queries : 2
(a) SELECT MID("YOUNG INDIA",5);
(b) SELECT INSTR("MACHINE INTELLIGENCE","IN");
4 Harjat has created the table EMP in his database.
Table : EMP

Now he wants to find the sum of commission earned by each department.


He has executed the following query :
SELECT dept,sum(comm)
GROUP BY dept
FROM EMP;
But, he got an error. Rewrite the correct query after identifying the error(s)
5 Ms. Anubha is working in a school and stores the details of all students in a Table : SCHOOL
Table : SCHOOL

(a) Write the SQL statements from the given table to :


(i) Remove TRAILING SPACES from column Sname.
(ii) Display the names of students who were born on Tuesday.

(b) Predict the output of the following SQL queries from the above
Table : SCHOOL :
(i) SELECT AVG(Per) FROM SCHOOL WHERE House="Red";
(ii) SELECT Sname, Per FROM SCHOOL WHERE MONTH(Dob)=11;
6 Predict the output of the following SQL queries : 3
(i) SELECT LENGTH("GOOD LUCK");
(ii) SELECT POWER(3, 3);
(iii) SELECT UPPER("examination");
7 Consider a Table "PETDATA" with the following data :
Table : PETDATA

Write SQL queries for the following : 3


(i) Display all the pet names in uppercase.
(ii) Display the total price of all the pets.
(iii) Display the average discount available on all the pets.
8 Write the names of SQL functions to perform the following operations : 3
(a) Display the name of the month from the given date value.
(b) Display the day of month from the given date value.
(c) Count the number of characters in a given string.
9 Consider the following Table : ITEM :
Table : ITEM

Find the output of the following SQL queries : 3


(a) SELECT 10+ QTY FROM ITEM WHERE ID = "P1003";
(b) SELECT PRICE*QTY FROM ITEM WHERE QTY < 2;
(c) SELECT LEFT(INAME,3) FROM ITEM;
10 Consider the Table FURNITURE with the following data :
Table : FURNITURE

Write SQL queries for the following : 4


(a) Display all the records in alphabetical order of Item.
(b) Display the Type and total number of items of each Type.
(c) Display the highest Price.
(d) Display the Item with their price rounded to 1 decimal place.
11 (a) Consider the following table :
Table : EMPLOYEE

Predict the output for the following SQL queries : 4


(i) SELECT MAX(Salary), FROM EMPLOYEE;
(ii) SELECT COUNT(Dept) FROM EMPLOYEE;
(iii) SELECT UCASE(Ename) FROM EMPLOYEE WHERE MONTH(Doj)=2;
(iv) SELECT Ename FROM EMPLOYEE WHERE Right(Ecode,1)=5;
12 Based on the given table EMPLOYEE write SQL queries to perform the following operations : 4
(i) Count the total number of employees.
(ii) Display the minimum salary from each area.
(iii) Display the average salary from each department where number of employees is more than 1.
(iv) Display all the records in descending order of date of joining

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy