Skip to main content
📘 Complete PDF

PySpark Certification Practice Test 04

Window Functions and Analytical Processing

Question 1 of 20
📋 Multiple Choice
Question 61
An interviewer says: "A retail company wants the latest order for every customer. The source table contains multiple orders per customer." Which function would most likely be used?
A. row_number()
B. count()
C. distinct()
D. sum()
Answer
✅ A. row_number()
Explanation
### Explanation row_number() is commonly used with partitionBy(customer_id) and ordered by order_date desc to identify the latest record.
Answered: 0 / 20
Question Navigator (Test 04)0% Answered