GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2025

GATE 2025 · DA · MCQ · 2 marks · Database Management and Warehousing › Data Warehouse Modelling & Multidimensional Schemas

GATE 2025 Data Science and Artificial Intelligence question: Consider a fact table in an OLAP application: Facts(D1, D2, val) , where D1 and D2 are…

Consider a fact table in an OLAP application: Facts(D1, D2, val), where D1 and D2 are its dimension attributes and val is a dependent attribute. Suppose attribute D1 takes 3 values and D2 takes 2 values, and all combinations of these values are present in the table Facts. How many tuples are there in the result of the following query?

SELECT D1, D2, sum(val)
FROM Facts
GROUP BY CUBE (D1, D2);
  1. (A)

    1

  2. (B)

    6

  3. (C)

    9

  4. (D)

    12

Show answer

Official answer: D

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion