Management & CommerceVery hardBusiness analyst · SQL test
sal(name, dept, s) has rows: dept X – A 90, B 90, C 80, D 70; dept Y – E 60, F 50, G 50, H 40. How many rows have DENSE_RANK() OVER (PARTITION BY dept ORDER BY s DESC) ≤ 2, and how many have RANK() … ≤ 2?
- A. DENSE_RANK: 5; RANK: 6
- B. DENSE_RANK: 6; RANK: 5
- C. DENSE_RANK: 4; RANK: 4
- D. DENSE_RANK: 6; RANK: 6
Correct answer: B. DENSE_RANK: 6; RANK: 5
In X, A and B tie at rank 1; DENSE_RANK gives C rank 2, but RANK gives C rank 3. In Y, E is 1 and F, G tie at 2 under both. So DENSE_RANK keeps A, B, C, E, F, G (6), while RANK keeps A, B, E, F, G (5).
Practise more Operations, Supply Chain & Business Analytics questionsOperations, Supply Chain & Business Analytics: notes and key points
More Operations, Supply Chain & Business Analytics questions
- An A/B test must detect a lift in conversion from 10% to 12% with α = 0.05 (two-sided) and 80% power. Using n ≈ (1.96 + 0.84)² × [p₁(1 −…
- Jobs arrive at an M/M/1 workstation at 10 per hour. Waiting (in the system) costs ₹100 per job per hour, and service capacity costs ₹40…
- Which statement correctly distinguishes the cycle-service level from the fill rate?
- A one-person repair shop treats jobs on a first-come basis. Its owner proposes giving priority to short jobs (shortest processing time…
- An e-commerce firm's monthly data – Jan: 10,000 orders, revenue ₹50 lakh, marketing spend ₹10 lakh, 2,000 new customers; Feb: 12,000…
- An e-commerce firm's monthly data – Jan: 10,000 orders, revenue ₹50 lakh, marketing spend ₹10 lakh, 2,000 new customers; Feb: 12,000…