
MySQL- group by and foreign key
Authored by Pavani (CBSE)
Computers
12th Grade
Used 20+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which clause is used with an "aggregate" function?
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
17 questions
Practice Laptops
Quiz
•
9th - 12th Grade
18 questions
Adobe Illustrator Tools
Quiz
•
10th - 12th Grade
15 questions
SQL
Quiz
•
11th - 12th Grade
11 questions
Python Library-1
Quiz
•
12th Grade
17 questions
Bitwise Manipulation and Hex Quiz
Quiz
•
12th Grade
10 questions
Word basics
Quiz
•
8th - 12th Grade
15 questions
Word Lesson 6
Quiz
•
9th - 12th Grade
14 questions
AZ-900 Module 1
Quiz
•
1st Grade - Professio...
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade
10 questions
Valentine's Day Trivia
Quiz
•
9th - 12th Grade