
SQL QUIZ -ADBMS
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Shabnam Choudhary
Used 10+ times
FREE Resource
Enhance your content in a minute
29 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the ROW_NUMBER function do in SQL?
The ROW_NUMBER function calculates the total number of rows in a result set.
The ROW_NUMBER function groups rows based on specified criteria.
The ROW_NUMBER function filters rows based on a condition.
The ROW_NUMBER function assigns a unique sequential integer to rows in a result set.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a school competition, students are ranked based on their scores. How does the RANK function differ from ROW_NUMBER in assigning these ranks?
ROW_NUMBER allows ties and skips ranks; RANK assigns unique numbers to each row.
RANK assigns unique numbers and skips ties; ROW_NUMBER allows ties and ranks them equally.
RANK allows ties and skips ranks; ROW_NUMBER does not allow ties and assigns unique numbers.
RANK and ROW_NUMBER both allow ties but RANK assigns higher numbers to tied values.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the DENSE_RANK function?
To sort rows in ascending order based on a specific column.
To assign unique ranks to each row regardless of ties.
To calculate the average of a set of values.
To assign ranks to rows in a result set without gaps for ties.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Saisha is analyzing sales data for her online store. She wants to calculate the total sales for each product category while also considering the sales made in different regions. Explain the use of the PARTITION BY clause in window functions in this context.
The PARTITION BY clause allows window functions to operate on subsets of data, enabling calculations within defined groups.
The PARTITION BY clause is used to sort data in ascending order.
The PARTITION BY clause is only applicable to aggregate functions.
The PARTITION BY clause combines all rows into a single group for calculations.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a class of students, how does the ORDER BY clause affect window functions when calculating their scores?
The ORDER BY clause specifies the order of rows for window function calculations.
The ORDER BY clause determines the number of rows returned by the window function.
The ORDER BY clause changes the data type of the window function results.
The ORDER BY clause is used to filter rows before window function calculations.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can you give an example of aggregating with window functions?
An example of aggregating with window functions is using SUM() OVER (ORDER BY column1) to calculate a running total.
Utilizing MAX() OVER (ORDER BY column3) to get the maximum value in a dataset.
Applying COUNT() OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) for total counts.
Using AVG() OVER (PARTITION BY column2) to find the average value.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a class of students, if Avyaan and Aarav both scored the same marks in a test, what will the ROW_NUMBER function return for them?
The same row number for each duplicate value.
No row number will be assigned to duplicates.
A unique row number for each row, even with duplicates.
A single row number for all duplicate values.
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
26 questions
Macromedia Flash
Quiz
•
8th Grade - Professio...
25 questions
Understanding Strings and Functions Quiz
Quiz
•
8th Grade - University
24 questions
computer qualifications.
Quiz
•
12th Grade - University
25 questions
KIEM TRA TX-K11 (BO SUNG)
Quiz
•
11th Grade - University
25 questions
TIK01
Quiz
•
12th Grade
29 questions
Computer Parts
Quiz
•
9th - 12th Grade
25 questions
Python
Quiz
•
9th - 12th Grade
30 questions
PHOTOSHOP
Quiz
•
12th Grade
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
