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. sum()
B. count()
C. distinct()
โœ“
D. row_number()
Answer
โœ… D. 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