CS FundamentalsVery hardWipro Elite · LTIMindtree
W(d, x) holds (1, 10), (2, 20), (2, 30), (3, 40). What value does SUM(x) OVER (ORDER BY d) give on the row (2, 20)?
- A. 30
- B. 50
- C. 100
- D. 60
Correct answer: D. 60
The default frame is RANGE UNBOUNDED PRECEDING to CURRENT ROW, which includes all peers with the same d: 10 + 20 + 30 = 60.
More DBMS and SQL questions
- Under the SQL standard's isolation levels, which anomaly can still occur at REPEATABLE READ but is prevented at SERIALIZABLE?
- Which pair of properties must every primary key satisfy?
- Which ACID property guarantees that a transaction's changes are applied completely or not at all?
- Which of these SQL commands is a DDL (Data Definition Language) command?
- In an ER model, a weak entity set is identified by:
- Which SQL clause filters groups AFTER aggregation?