Management & CommerceVery hardMBA Placement · Data Analyst · SQL test
sales(region, product, amt) contains these region–product combinations: North–A, North–B, South–A, South–B, South–C and East–A (several rows each). How many rows does SELECT region, product, SUM(amt) FROM sales GROUP BY ROLLUP(region, product) return?
- A. 13
- B. 9
- C. 10
- D. 7
Correct answer: C. 10
ROLLUP(region, product) gives the 6 detail groups, 3 region subtotals (product NULL) and 1 grand total: 10. CUBE would add 3 product subtotals for 13; 9 forgets the grand total.
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- A customer's path before a ₹5,000 purchase is Social ad → Search ad → Email → Display ad. How much revenue does the Search ad get under…
- Among 10,000 transactions, 100 are fraudulent. Model A catches 80 frauds and flags 400 genuine ones; Model B catches 90 frauds and flags…
- A churn model scores three churners 0.9, 0.7 and 0.4, and four non-churners 0.8, 0.5, 0.3 and 0.2. What is the ROC AUC?
- Weekly demand for a gadget is Q = 1,000 − 20P (P in ₹), and each unit costs ₹10 to make. Which price maximises weekly profit?
- Three processes can make a part: A (fixed cost ₹2 lakh a year, variable ₹60/unit), B (₹5 lakh, ₹40/unit) and C (₹9 lakh, ₹30/unit). Over…
- An analyst standardises every feature using the mean and SD of the full dataset and then runs 5-fold cross-validation, getting 92%…