
SQL QUIZ -ADBMS

Quiz
•
Computers
•
12th Grade
•
Medium
Shabnam Choudhary
Used 10+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
33 questions
أسئلة متنوعة على الدرس الاول من الوحدة الأولى

Quiz
•
12th Grade
27 questions
Python Fundamentals - II

Quiz
•
11th - 12th Grade
25 questions
AQA OOP Programming

Quiz
•
10th - 12th Grade
30 questions
SKT5 : Bab 2 : SQL

Quiz
•
10th - 12th Grade
27 questions
My SQL

Quiz
•
11th - 12th Grade
25 questions
035_Cloud-specific Vulnerabilities – CompTIA Security+ –

Quiz
•
9th Grade - University
25 questions
KS3 Y7 Evaluation 1-4

Quiz
•
12th Grade
30 questions
AP CSA - Unit 6 Arrays Test Review

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade