Please refer to the MCQ Questions for Class 12 Informatics Practices Chapter 3 Data Handling using Pandas – II with Answers. The following Data Handling using Pandas – II Class 12 Informatics Practices MCQ Questions have been designed based on the latest syllabus and examination pattern for Class 12. Our experts have designed MCQ Questions for Class 12 Informatics Practices with Answers for all chapters in your NCERT Class 12 Informatics Practices book.
Data Handling using Pandas – II Class 12 MCQ Questions with Answers
See below Data Handling using Pandas – II Class 12 Informatics Practices MCQ Questions, solve the questions and compare your answers with the solutions provided below.
Question. What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement?
SELECT name, COUNT (emp_id),emp_no
FROM department
GROUP BY name
HAVING COUNT (emp_id)>2;
(a) Filter out all rows whose total emp_id below 2
(b) Selecting those rows whose total emp_id>2
(c) Both (a) and (b)
(d) None of the mentioned
Answer
C
Question. Which of the following is not a valid SQL statement?
(a) SELECT MIN(pub_date) FROM books GROUP BY category HAVING pub_id = 4;
(b) SELECT MIN(pub_date) FROM books WHERE category = ‘COOKING’;
(c) SELECT COUNT(*) FROM orders WHERE customer# = 1005;
(d) SELECT MAX(COUNT(customer#)) FROM orders GROUP BY customer#;
Answer
A
Question. In which function, NULL values are excluded from the result returned?
(a) SUM()
(b) MAX()
(c) MIN()
(d) All of these
Answer
D
Question. What is the significance of “ORDER BY” in the following MySQL statement?
SELECT emp_id, fname, lname
FROM person
ORDER BY emp_id;
(a) Data of emp_id will be sorted
(b) Data of emp_id will be sorted in descending order
(c) Data of emp_id will be sorted in ascending order
(d) All of the mentioned
Answer
C
Question. If emp_id contain the following set {9, 7, 6, 4, 3, 1, 2}, what will be the output on execution of the following MySQL statement?
SELECT emp_id
FROM person ORDER BY emp_id;
(a) {1, 2, 3, 4, 6, 7, 9}
(b) {2, 1, 4, 3, 7, 9, 6}
(c) {9, 7, 6, 4, 3, 1, 2}
(d) None of the mentioned
Answer
A
Question. Which clause is similar to “HAVING” clause in MySQL?
(a) SELECT
(b) WHERE
(c) FROM
(d) None of the mentioned
Answer
B
Question. What will be the order of sorting in the following MySQL statement?
SELECT emp_id, emp_name
FROM person
ORDER BY emp_id, emp_name;
(a) Sorting {emp_id, emp_name}
(b) Sorting {emp_name, emp_id}
(c) Sorting {emp_id} but not emp_name
(d) None of the mentioned
Answer
A
Question. The AVG() function in MySQL is an example of
(a) Math function
(b) Text function
(c) Date function
(d) Aggregate function
Answer
D
Question. What is the significance of the statement “GROUP BY d.name” in the following MySQL statement?
SELECT name, COUNT (emp_id), emp_no
FROM department
GROUP BY name;
(a) Counting of the field “name” on the table “department”
(b) Aggregation of the field “name” of table “department”
(c) Sorting of the field “name”
(d) None of the mentioned
Answer
B
Question. Which of the following function count all the values except NULL?
(a) COUNT(*)
(b) COUNT(column_name)
(c) COUNT(NOT NULL)
(d) COUNT(NULL)
Answer
A
Question. Which of the following is not an aggregate function?
(a) AVG()
(b) ADD()
(c) MAX()
(d) COUNT()
Answer
B
Question. Which clause is used with an “aggregate functions”?
(a) GROUP BY
(b) SELECT
(c) WHERE
(d) Both (a) and (c)
Answer
A
Question. Find odd one out?
(a) GROUP BY
(b) DESC
(c) ASC
(d) ORDER BY
Answer
A
Question. Which aggregate function returns the count of all rows in a specified table?
(a) SUM()
(b) DISTINCT()
(c) COUNT()
(d) None of these
Answer
C
Question. What is the meaning of “GROUP BY” clause in MySQL?
(a) Group data by column values
(b) Group data by row values
(c) Group data by column and row values
(d) None of the mentioned
Answer
A
Case Based MCQs :
A School in Delhi uses database management system to store student details. The school maintains a database ‘school_record’ under which there are two tables.
Student Table Maintains general details about every student enrolled in school.
StuLibrary Table To store details of issued books. BookID is the unique identification number issued to each book. Minimum issue duration of a book is one day.

Question. The primary key for StuLibrary table is/are …….
(a) BookID
(b) BookID,StuID
(c) BookID,Issued_date
(d) Issued_date
Answer
A
Question. Which of the following SQL query will display dates on which number of issued books is greater than 5?
(a) SELECT Issued_date FROM StuLibrary GROUP BY Issued_date WHERE COUNT(*)>5;
(b) SELECT Issued_date FROM StuLibrary GROUP BY Return_date HAVING COUNT(*)>5;
(c) SELECT Issued_date FROM StuLibrary GROUP BY Issued_date HAVING COUNT(*)>5;
(d) SELECT Issued_date FROM StuLibrary GROUP BY Return_date WHERE COUNT(*)>5;
Answer
C
Question. Identify the SQL query which displays the data of StuLibrary table in ascending order of student ID.
I. SELECT * FROM StuLibrary ORDER BY BookID;
II. SELECT * FROM StuLibrary ORDER BY StuID;
III. SELECT * FROM StuLibrary ORDER BY StuID ASC;
IV. SELECT * FROM StuLibrary ORDER BY StuID DESC;
Choose the correct option, which displays the desired data.
(a) Both I and IV
(b) Both I and II
(c) Both III and IV
(d) Both II and III
Answer
D

Question. Which SQL statement lets you find the total number of stores in the SALES table?
(a) SELECT COUNT(Store_ID) FROM Sales;
(b) SELECT COUNT(DISTINCT Store_ID) FROM Sales;
(c) SELECT DISTINCT Store_ID FROM Sales;
(d) SELECT COUNT(Store_ID) FROM Sales GROUP BY Store_ID;
Answer
D
Question. Which SQL statement allows you to find the highest price from the table Book_Information?
(a) SELECT Book_ID,Book_Title,MAX(Price) FROM Book_Information;
(b) SELECT MAX(Price) FROM Book_Information;
(c) SELECT MAXIMUM(Price) FROM Book_Information;
(d) SELECT Price FROM Book_Information ORDER BY Price DESC ;
Answer
B
Question. Which SQL statement lets you to list all store name whose total sales amount is over 5000 ?
(a) SELECT Store_ID, SUM(Sales_Amount) FROM Sales GROUP BY Store_ID HAVING SUM(Sales_Amount) > 5000;
(b) SELECT Store_ID, SUM(Sales_Amount) FROM Sales GROUP BY Store_ID HAVING Sales_Amount > 5000;
(c) SELECT Store_ID, SUM(Sales_Amount) FROM Sales WHERE SUM(Sales_Amount) > 5000 GROUP BY Store_ID;
(d) SELECT Store_ID, SUM(Sales_Amount) FROM Sales WHERE Sales_Amount > 5000 GROUP BY Store_ID;
Answer
A
Question. Which SQL statement allows you to find the total sales amount for Store_ID 25 and the total sales amount for Store_ID 45?
(a) SELECT Store_ID, SUM(Sales_Amount) FROM Sales WHERE Store_ID IN ( 25, 45) GROUP BY Store_ID;
(b) SELECT Store_ID, SUM(Sales_Amount) FROM Sales GROUP BY Store_ID HAVING Store_ID IN ( 25, 45);
(c) SELECT Store_ID, SUM(Sales_Amount) FROM Sales WHERE Store_ID IN (25,45);
(d) SELECT Store_ID, SUM(Sales_Amount) FROM Sales WHERE Store_ID = 25 AND Store_ID =45 GROUP BY Store_ID;
Answer
B
Question. Which SQL statement allows you to find sales amount for each store?
(a) SELECT Store_ID, SUM(Sales_Amount) FROM Sales;
(b) SELECT Store_ID, SUM(Sales_Amount) FROM Sales ORDER BY Store_ID;
(c) SELECT Store_ID, SUM(Sales_Amount) FROM Sales GROUP BY Store_ID;
(d) SELECT Store_ID, SUM(Sales_Amount) FROM Sales HAVING UNIQUE Store_ID;
Answer
C