GROUP BY
GATE CSE & IT · SQL · 1999-2021
Study anchor
Korth — Database System Concepts
Relational model, SQL, normalization, transactions
Practice action
Start latest PYQPYQs in this concept
All concepts →The relation scheme given below is used to store information about the employees of a company, where empId is the key and deptId indicates the department to which the employee is a...
Consider the following database table named $$water$$_$$schemes :$$ water_schemes scheme_no district_name capacity 1 Ajmer 20 1 Bikaner 10 2 Bikaner 10 3 Bikaner 20 1 Churu 10 2 Ch...
Consider the following relation: Student Roll_No Student_Name 1 Raj 2 Rohit 3 Raj Performance Roll_No Course Marks 1 Math 80 1 English 70 2 Math 75 3 English 80 2 Physics 65 3 Math...
Given the following schema: employees(emp-id, first-name, last-name, hire-date, dept-id, salary) departments(dept-id, dept-name, manager-id, location-id) You want to display the la...
Which of the following statements are TRUE about an SQL query? P: An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q: An SQL query can contain a...
Consider The Following Relational Scheme Student ( school-id, sch-roll-no , sname, saddress) School ( school-id , sch-name, sch-address, sch-phone) Enrolment ( school-id, sch-roll-...
Consider the relation account (customer, balance) where customer is a primary key and there are no null values. We would like to rank customers according to decreasing balance. The...
The employee information in a company is stored in the relation Employee (name, sex, salary, deptName) Consider the following SQL query Select deptName From Employee Where sex = ‘M...
Consider the set of relations EMP (Employee-no, Dept-no, Employee-name, Salary) DEPT (Dept-no, Dept-name, Location) Write an SQL query to: (a) Find all employee names who work in d...