Neco 2023 Data Processing Question 40

Practice objective / multiple choice question 40 from the 2023 Neco Data Processing examination.

Neco 2023 Data Processing Objective / Multiple Choice Medium Difficulty
Question 40 NECO • 2023 • DATA_PROCESSING • objective

A database has two tables.\n\nProducts(PID, Category, Price) - 200 rows. The 200 products are evenly distributed among 5 categories, and 120 products have \(Price > 50\). The average \(Price\) of these 120 products is \(70\).\n\nSales(SID, PID, Quantity) - 800 rows. Each product appears in the Sales table exactly 4 times on average.\n\nConsider the query:\n\nSELECT Category, SUM(Price * Quantity) AS Revenue\nFROM Products NATURAL JOIN Sales\nWHERE Price > 50\nGROUP BY Category;\n\n(a) How many rows are produced by the join before the GROUP BY clause is applied?\n(b) How many rows are returned by the query (i.e., number of distinct categories in the result)?\n(c) What is the total Revenue for a particular category, say Category C1, assuming the average Quantity per sale for that category is 3?

Answer Options

A. Join produces 400 rows; the query returns 5 rows; Revenue for Category C1 is 18,720.
B. Join produces 480 rows; the query returns 5 rows; Revenue for Category C1 is 22,500.
C. Join produces 480 rows; the query returns 4 rows; Revenue for Category C1 is 20,160.
Correct Answer D. Join produces 480 rows; the query returns 5 rows; Revenue for Category C1 is 20,160.
Correct Answer
D
Correct Option:
Join produces 480 rows; the query returns 5 rows; Revenue for Category C1 is 20,160.

About This Question

This is Neco 2023 Data Processing Question 40. It is one of the objective questions from the 2023 Neco Data Processing examination.

Difficulty level: Medium .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support