- `GROUP BY` clause: Used to group rows that have the same values in one or more columns into a summary row. - `COUNT()`: An aggregate function that returns the number of rows in a group. - `HAVING` clause: Used to filter groups based on a specified condition, typically involving aggregate functions. It acts like a `WHERE` clause for groups.
Consider the following Query SELECT Course FROM STUDENT GROUP BY Course HAVING Count(*) > 10; where STUDENT is a relation with one of its attributes as ‘Course’. What will be the result of the Query?
Asked in Analyst Cum Programmer (Deputy Director) 2024 · Topic: Basics of Computers and Information Technology (Database Management Systems (DBMS) Basics: Concepts, Types of Databases)
Show answer
Answer: C. All courses with more than 10 students
Read the notes: Basics of Computers and Information Technology →
More Information and Communication Technology questions
- Which collision resolution technique in hashing handles collisions by storing all keys that hash to the same index in a linked list? - Question not attempted
- In query optimization, why is join order important when dealing with multiple joins? - Question not attempted
- Which amongst the following options is the correct match of the Names in Column-I with the Actions in the Column-II? Column-I (Name) (i) Trigger (ii) Cursor (iii) Stored procedure (iv) View Column-II (Action) (a) A virtual table derived from other tables (b) Automatically execute active rules on occurrence of events (c) Single tuple from a Query result that retrieves a collection of tuples (d) Precompiled SQL statements that are stored at the database server - (5) Question not attempted
- What is a common technique for concurrency control in DBMS? - Question not attempted
- Which condition must be true for using MINUS between two relations? - Question not attempted
- In embedded SQL, which prefix allows the programmers to refer shared variables in SQL statements? - Question not attempted
- Which of the following statement is true with regards to candidate keys and super keys? - Every super key is a candidate key. - Candidate keys must contain all attributes of the relation. - Candidate keys are minimal super key with no redundant attributes. - A candidate key must include a foreign key. - Question not attempted
- Under which of the following conditions, a SQL view is said to be updatable? - The FROM clause has more than one database relation. - The SELECT clause contains only attribute names (no expressions, aggregates or DIS‐ TINCT). - Any attribute not listed in SELECT clause can be set to NULL and is not part of primary key. - The query does not use GROUP BY or HAVING. Select the correct combination using the code below - (1) (A), (B), (C) and (D) (2) (A), (B) and (D) only (3) (B), (C) and (D) only (4) (A) and (B) only (5) Question not attempted
All 1,360 Information and Communication Technology questions →