Log in
Sign up for FREE
arrow_back
Library
AGGREGATE FUNCTION IN SQL
By Manoj Kulshrestha
star
star
star
star
star
Share
share
Last updated over 5 years ago
10 questions
Add this activity
Note from the author:
SQL AGGREGATE FUNCTION TEST
1
1
1
1
1
1
1
1
1
1
Question 1
1.
Q-1 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
Question 2
2.
Q-2 Which clause is similar to “HAVING” clause in Mysql?
a) SELECT
b) WHERE
c) FROM
d) None of the mentioned
Question 3
3.
Q-3 What is the meaning of “HAVING” clause in Mysql?
a) To filter out the row values
b) To filter out the column values
c) To filter out the row and column values
d) None of the mentioned
Question 4
4.
Q-4 “COUNT” keyword belongs to which categories in Mysql?
a) Aggregate functions
b) Operators
c) Clauses
d) All of the mentioned
Question 5
5.
Q-5 Which among the following belongs to an “aggregate function”?
a) COUNT
b) UPPER
c) LOWER
d) All of the mentioned
Question 6
6.
Q-6 Which of the following belongs to an “aggregate function”?
a) COUNT
b) b) SUM/AVG
c) MIN/MAX
d) All of the mentioned
Question 7
7.
q-7 Which clause is used with an “aggregate functions”?
a) GROUP BY
b) SELECT
c) WHERE
d) Both GROUP BY and WHERE
Question 8
8.
Q-8 What is the significance of the statement “GROUP BY d.name” in the following MySQL statement?
SELECT
d
.
name
,
COUNT
(
emp_id
)
emp_no
FROM
department d
INNER
JOIN
Employee e
ON
d
.
dept_id
=
e
.
emp_id
GROUP
BY
d
.
name
a) Aggregation of the field “name” of both table
b) Aggregation of the field “name” of table “department”
c) Sorting of the field “name”
d) None of the mentioned
Question 9
9.
Q-9 What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement?
SELECT
d
.
name
,
COUNT
(
emp_id
)
emp_no
FROM
department d
INNER
JOIN
Employee e
ON
d
.
dept_id
=
e
.
emp_id
GROUP
BY
d
.
name
HAVING
COUNT
(
emp_id
)
>
a) Filter out all rows whose total emp_id below 2
b) Selecting those rows whose total emp_id>2
c) Filter out all rows whose total emp_id below 2 & Selecting those rows whose total emp_id>2
d) None of the mentioned
Question 10
10.
Q-10 A Group By clause can use column aliasing.
True
False