CS FundamentalsEasyGATE CS (PYQ pattern)

An equi-width histogram on column A (range 0 to 100, 10,000 rows) has buckets [0,20): 4000, [20,40): 2500, [40,60): 1500, [60,80): 1500, [80,100]: 500 rows. Assuming values are uniform inside each bucket, what is the estimated number of rows satisfying 30 <= A < 70?

  1. A. 3500
  2. B. 4500
  3. C. 3000
  4. D. 4000

Correct answer: A. 3500

Bucket [20,40) contributes half: 1250; [40,60) fully: 1500; [60,80) half: 750. Total 3500. The uniform assumption over the whole range would give 4000.

More DBMS and SQL questions

Exams that ask this topic