Empowering Students with AI-Powered Assessments & Intelligent Learning
Chapter Exam

Chapter-4 Querying and SQL Functions — Online MCQ Test

INFORMATICS PRACTICES · Grade 12 · CBSE(NCERT)

Practice Chapter-4 Querying and SQL Functions with a free chapter-wise online MCQ test for CBSE(NCERT) Grade 12 INFORMATICS PRACTICES. This chapter covers: SQL - single row functions - aggregate functions - SUM - AVG - COUNT - MAX - MIN - GROUP BY - HAVING - ORDER BY - table joins. AI-generated questions from basic to board-exam level, with instant results and explanations.

10
Questions
20m
Time Limit
3
Attempts Left
  • 10 random questions from this chapter (mixed difficulty)
  • Questions you've seen before won't repeat until the pool resets
  • You have 20 minutes — exam auto-submits when time is up
  • Maximum 3 attempts per chapter
  • Results and explanations shown immediately after submission
Login to Start This Exam →

New here? Register free — includes 3 free chapter exams.

Chapter-4 Querying and SQL Functions — Important Questions & Answers (FAQ)

Frequently asked questions from CBSE(NCERT) Grade 12 INFORMATICS PRACTICES — Chapter-4 Querying and SQL Functions, with answers and explanations. These are sample questions; the exam has its own separate question set.

Which SQL function is used to count the number of rows in a table?
  • A. SUM()
  • B. COUNT() ✓
  • C. AVG()
  • D. MAX()
Answer: B. COUNT()
COUNT() is the aggregate function specifically designed to count the number of rows that match a specified condition in a table.
What does the AVG() function return?
  • A. The total sum of all values
  • B. The average or mean value of a numeric column ✓
  • C. The highest value in a column
  • D. The lowest value in a column
Answer: B. The average or mean value of a numeric column
AVG() calculates and returns the average (mean) of all numeric values in a specified column.
Which of the following is NOT an aggregate function?
  • A. SUM()
  • B. COUNT()
  • C. ROUND() ✓
  • D. AVG()
Answer: C. ROUND()
ROUND() is a scalar/single-row function that rounds numeric values, not an aggregate function that operates on multiple rows.
What is a single-row function in SQL?
  • A. A function that works on multiple rows at once
  • B. A function that processes each row independently and returns one result per input row ✓
  • C. A function used only with GROUP BY
  • D. A function that can only be used in WHERE clause
Answer: B. A function that processes each row independently and returns one result per input row
Single-row functions operate on each row individually and return one result for each input row, unlike aggregate functions that work on multiple rows.
Consider this scenario: You need to find the department with the highest total salary expense. Which query structure is most appropriate?
  • A. SELECT Department FROM Employees ORDER BY Salary DESC LIMIT 1
  • B. SELECT Department, SUM(Salary) FROM Employees GROUP BY Department ORDER BY SUM(Salary) DESC LIMIT 1 ✓
  • C. SELECT Department, MAX(Salary) FROM Employees GROUP BY Department
  • D. SELECT Department FROM Employees WHERE Salary = MAX(Salary)
Answer: B. SELECT Department, SUM(Salary) FROM Employees GROUP BY Department ORDER BY SUM(Salary) DESC LIMIT 1
This query correctly groups by department, sums all salaries per department, orders by total salary descending, and limits to the top result.

Choose Your Plan & Start Practising

All plans cover every subject and chapter of your registered grade.

Free
₹0
3 exams · 1 year
Start Free →
Active
₹350
12 exams · 1 year
Get Active →
Pro
₹899
Unlimited exams · 1 year
Get Pro →

Compare all plans in detail →