91 solutions available
Question 1Assertion. SQL SELECT's GROUP BY clause is used to divide the result in groups.Reason. The GROUP BY clause combines all those records that...
Question 2Assertion. A GROUP BY query can also include functions.Reason. ALL SQL functions can be used in a GROUP BY query.
Question 3Assertion. SQL SELECT query can also fetch rows from multiple tables.Reason. A join is a query that combines rows from two or more tables.
Question 4Assertion. Generally, a join query combines rows from multiple tables having some common column(s) and a joining condition, but not...
Question 5Assertion. The join, in which columns are compared for equality, is called Equi-join.Reason. The join queries only produce combined rows...
Question 6Assertion. In the result produced by a join query, there may be multiple identical columns in the final result, but not always.Reason. The...
Question 7Assertion. In order to carry out the join operation, there should be a governing condition.Reason. A join condition may be based on...
Question 1To specify condition with a GROUP BY clause, HAVING clause is used.
Question 2Only aggregate functions are used with GROUP BY.
Question 3A JOIN is a means for combining fields from two tables by using values common to each.
Question 4The equi join uses = operator in the join condition.
Question 5Natural join joins two tables on the basis of a common field.
Question 6The SQL built-in function SUM totals values in numeric columns.
Question 7The SQL built-in function AVG computes the average of values in numeric columns.
Question 8The SQL built-in function MAX obtains the largest value in a numeric column.
Question 9The SQL built-in function MIN obtains the smallest value in a numeric column.
Question 10The SQL built-in function COUNT computes the number of rows in a table.
Question 11The SELECT clause GROUP BY is used to collect those rows that have the same value in a specified column.
Question 12To compare an aggregate value in a condition, HAVING clause is used.
Question 13To create a summary of records based on the common value in a field in different rows of the table GROUP BY clause is used.
Question 14To get data from two or more tables having some common fields, join query is created.
Question 15In equi-join, the join condition joins the two table using = operator.
Question 1A ............... is a query that retrieves rows from more than one table or view:StartEndJoinAll of these
Question 2The HAVING clause does which of the following ?Acts EXACTLY like a WHERE clause.Acts like a WHERE clause but is used for columns rather...
Question 3Aggregate functions can be used in the select list or the ............... clause of a select statement. They cannot be used in a...
Question 4SQL applies conditions on the groups through ............... clause after groups have been formed.Group byWithWhereHaving
Question 5Which clause is used with "aggregate functions" ?GROUP BYSELECTWHEREBoth (1) and (3)
Question 6What is the meaning of "HAVING" clause in SELECT query ?To filter out the summary groupsTo filter out the column groupsTo filter out the...
Question 7Where and Having clauses can be used interchangeably in SELECT queries ?TrueFalseOnly in viewsWith order by
Question 8The operation whose result contains all pairs of tuples from the two relations, regardless of whether their attribute values...
Question 9Which SQL function is used to count the number of rows in a SQL query ?COUNT()NUMBER()SUM()COUNT(*)
Question 10Which of the following is not an aggregate function ?AvgSumWithMin
Question 11All aggregate functions except ............... ignore null values in their input collection.Count(attribute)Count(*)AvgSum
Question 12Which of the following is a SQL aggregate function ?LEFTAVGJOINLEN
Question 13Which of the following group functions ignore NULL values ?MAXCOUNTSUMAll of the above
Question 14The functions which work with individual rows' data are called ............... function.Single rowMultiple rowsAggregateNone of these
Question 15Function count() is a/an ............... function.Single rowMultiple rowsAggregateNone of these
Question 16The sum(), if used in a condition, is used with ............... clause.Group byWithWhereHaving
Question 17Which clause cannot be used with "aggregate functions" ?GROUP BYSELECTWHEREBoth (1) and (3)
Question 18What is the meaning of "WHERE" clause in a GROUP BY query ?To filter out the summary groupsTo filter out the column groupsTo filter out...
Question 19The following SQL is which type of join :SELECT CUSTOMER.CUST_ID, ORDER.CUST_ID, NAME, ORDER_ID FROM CUSTOMER, ORDER WHERE...
Question 20The following SQL is which type of join :SELECT CUSTOMER.CUST_ID, ORDER.CUST_ID, NAME, ORDER_ID FROM CUSTOMER, ORDEREqui-joinNatural...
Question 21Which product is returned in a join query have no join condition ?EquijoinsCartesian productBoth (1) and (2)None of the mentioned
Question 22Which is a join condition contains an equality operator ?EquijoinsCartesian productBoth (1) and (2)None of the mentioned
Question 1The HAVING clause acts like a WHERE clause, but it identifies groups that meet a criterion, rather than rows.
Question 2Data manipulation language (DML) commands are used to define a database, including creating, altering, and dropping tables and establishing...
Question 3The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same value in a column.
Question 4Equi join can use any operator for joining two tables.
Question 5Missing join condition in join query produces cartesian product.
Question 6COUNT(field_name) tallies only those rows that contain a value; it ignores all null values.
Question 7SUM, AVG, MIN, and MAX can only be used with numeric columns.
Question 8The SQL keyword GROUP BY instructs the DBMS to group together those rows that have the same value in a column.
Question 9The HAVING and WHERE clauses are interchangeable.
Question 10The HAVING clauses can take any valid SQL function in its condition.
Question 11HAVING clause can only be used if the SELECT query has GROUP BY clause.
Question 12With GROUP BY, the select-list of the SELECT statement can only take the group-field and/or aggregate function.
Question 13A join query without the join condition produces a cartesian product.
Question 14You can specify any type of condition, using any comparison operator in an equi-join.
Question 15Join can only be created from two tables.
Question 1What is the difference between HAVING and WHERE clause ?
Question 2What is the use of GROUP BY clause ?
Question 3What are aggregate functions? What is their use? Give some examples.
Question 4What type of functions can you use with GROUP BY and HAVING clauses ?
Question 5What is sql join ? How is it useful ?
Question 6What are most common types of SQL joins ?
Question 1Table BOOK_INFORMATIONColumn NameBOOK_IDBOOK_TITLEPRICEWhich SQL statement allows you to find the highest price from the table...
Question 2Table SALESColumn NameSTORE_IDSALES_DATESALES_AMOUNTWhich SQL statement lets you find the sales amount for each store?SELECT STORE_ID,...
Question 3Table SALESColumn NameSTORE_IDSALES_DATESALES_AMOUNTWhich SQL statement lets you list all stores whose total sales amount is over 5000...
Question 4Table SALESColumn NameSTORE_IDSALES_DATESALES_AMOUNTWhich SQL statement lets you find the total number of stores in the SALES table?SELECT...
Question 5Table SALESColumn NameSTORE_IDSALES_DATESALES_AMOUNTWhich SQL statement allows you to find the total sales amount for Store ID 25 and the...
Question 6Table EXAM_RESULTSSTU IDFNAMELNAMEEXAM...
Question 7Table EXAM_RESULTSSTU IDFNAMELNAMEEXAM...
Question 8Table EXAM_RESULTSSTU IDFNAMELNAMEEXAM...
Question 9Table EXAM_RESULTSSTU IDFNAMELNAMEEXAM...
Question 10Given the following table :Table :...
Question 11In a Database, there are two tables given below :Table : EMPLOYEEEMPLOYEEIDNAMESALESJOBIDE1SUMIT SINHA1100000102E2VIJAY SINGH...
Question 12Consider the following tables Employee and Salary. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v)...
Question 13With reference to following relations PERSONAL and JOB answer the questions that follow :Create following tables such that Empno and Sno...
Question 14aWith reference to the table below, answer the questions that follow :Table : EmployeesEmpidFirstnameLastnameAddressCity010RaviKumarRaj...
Question 14bWith reference to the table below, answer the questions that follow :Table : EmployeesEmpidFirstnameLastnameAddressCity010RaviKumarRaj...
Question 15Show the average salary for all departments with more than 3 people for a job.
Question 16Display only the jobs with maximum salary greater than or equal to 3000.
Question 17Find out number of employees having "Manager" as Job.
Question 18List the count of employees grouped by deptno. (table EMPL)
Question 19List the sum of employees' salaries grouped by department. (table EMPL)
Question 20List the maximum salary of employee grouped by their department number.
Question 21Below are the customer and order tables :Customerscustomer id (PK)first_namelast_nameemailaddresscitystatezipOrdersorder id...
Question 22Below are the customer and order tables :Customerscustomer id (PK)first_namelast_nameemailaddresscitystatezipOrdersorder id...
Question 23Below are the customer and order tables :Customerscustomer id (PK)first_namelast_nameemailaddresscitystatezipOrdersorder id...
Question 24Schemas of tables EMPL, Dept, SalaryGrade are being shown below :EMPL (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO) SALARYGRADE...
Question 25Schemas of tables EMPL, Dept, SalaryGrade are being shown below :EMPL (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO) SALARYGRADE...