Which clause is used with an "aggregate" function?
MySQL- group by and foreign key

Quiz
•
Computers
•
12th Grade
•
Hard
Pavani (CBSE)
Used 20+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
GROUP BY
SELECT
WHERE
Both GROUP BY and WHERE
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the meaning of "GROUP BY" clause?
Group data by column values
Group data by row values
Group data by column and row values
None of the mentioned
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How to select number of employees - department wise from Emp table (EmpNo, DeptNo, EmpName)?
Select empno, count(*) from Emp Group By deptno;
Select deptno, count(*) from Emp Group By deptno;
Select empno, count(*) from Emp Order By deptno;
Select deptno, count(*) from Emp Order By deptno;
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Null values in GROUP BY fields are omitted.
True
False
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which statements are true about Group By?
Group By is used to group set of values based on one or more values
Group By is used when we use aggregate functions
Group by does not guarantee sorting the data in any order
All of above
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How to select Maximum Salary of Employee from each Department in Emp table(empno, ename, deptno, sal)?
Select deptno, sal from Emp Group By deptno Order By Max(Sal);
Select deptno, sal from Emp Group By deptno having sal = max(sal);
Select deptno, max(sal) from Emp Group By deptno;
Select deptno, max(sal) from Emp Order By Max(Sal);
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is correct to count the total salary dept wise where there are more than two employees in a dept from emp table (empno, ename, deptno, sal)
SELECT deptno, sum(sal) As totalsal FROM emp GROUP BY deptno HAVING COUNT(empno) = 2
SELECT deptno, sum(sal) As totalsal FROM emp where COUNT(empno) = 2 GROUP BY deptno
SELECT deptno, sum(sal) As totalsal FROM emp GROUP BY deptno HAVING COUNT(empno) > 2
SELECT deptno, sum(sal) As totalsal FROM emp where COUNT(empno) > 2 GROUP BY deptno
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
PYTHON DATABASE CONNECTIVITY

Quiz
•
12th Grade
15 questions
RDBMS & SQL QUERIES

Quiz
•
12th Grade
10 questions
MySQL revision tour

Quiz
•
11th - 12th Grade
15 questions
BTEC unit 2 databases - key terms

Quiz
•
12th Grade
11 questions
SQL

Quiz
•
10th - 12th Grade
15 questions
Cambridge Technicals Unit 2 LO3 [3.2 - 3.5]

Quiz
•
12th Grade
16 questions
Introduction to Programming Vocabulary

Quiz
•
9th - 12th Grade
10 questions
Unit 7 - Formatting Cells and Ranges

Quiz
•
5th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University