RRB Junior Engineer / DMS / CMA 2019 · Question 3616 of 3719
Concept: The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each country". The GROUP BY statement is often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns. GROUP BY Syntax SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) ORDER BY column_name(s); The ORDER BY keyword is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword. ORDER BY Syntax SELECT column1, column2, ... FROM table_name ORDER BY column1, column2, ... ASC|DESC; The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions. HAVING Syntax SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) HAVING condition ORDER BY column_name(s); The SELECT statement is used to select data from a database. The data returned is stored in a result table, called the result-set. SELECT Syntax SELECT column1, column2, ... FROM table_name; Hence Option C is correct
Source: RRB JE 2019 (CBT 2) (IT) Previous Year Paper (30 Aug 2019) — prepp.in solved-paper PDF (answer key with explanations) · reliable-secondary
Practice the full RRB Junior Engineer / DMS / CMA 2019 paper
Timed test with all 3719 questions, just like the real exam.
Start test