Search Header Logo

Induction_Training_2

Authored by Training TechHub

Education

Professional Development

Used 2+ times

Induction_Training_2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

71 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Given table has 100 tuples and write a query to find out only 50 tuples from given table (only first half records).

SELECT TOP FIRSTHALF * FROM Bikes;

ELECT TOP 1/2 * 

FROM Bikes;  

SSELECT TOP 

HALF  * FROM Bikes;  

SELECT TOP 50 PERCENT * FROM Bikes; 

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Write a query and find out number of unique salaries and return unique salary from EMP table.

SELECT COUNT (UNIQUE Emp_Salary) AS Unique_Salary FROM Employee ; 

SELECT COUNT (DISTINCT Emp_Salary) ,Salary FROM Employee ; 

SELECT AS Unique_Salary , COUNT (DISTINCT Emp_Salary)  FROM Employee ; 

SELECT COUNT (DISTINCT Emp_Salary) AS Unique_Salary FROM Employee ; 

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which query will “find out two employees who came from Delhi”?

SELECT TOP 2 * FROM Employee WHERE Emp_City = Delhi ;  

SELECT  2 * FROM Employee WHERE Emp_City = Delhi ; 

SELECT  * FROM Employee WHERE Emp_City = Delhi  AND Emp_City<2;  

SELECT TOP 2 *  Employee WHERE Emp_City = Delhi ;  

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which query will help us to select a random record from table?

SELECT column  FROM table  ORDER BY NEWID()  

SELECT RANDOM column FROM table  ORDER BY NEWID()  

SELECT TOP 1 column FROM table  ORDER BY NEWID()  

SELECT TOP 1 column FROM table  AS NEWID()  

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Write a query to find out total sales but total sales greater then 300 from department table?

SELECT department, SUM (sales) AS "Total Sales"  

FROM order_details  

GROUP BY department WHERE SUM (sales)>300;

SELECT department, SUM (sales) AS "Total Sales"  

FROM order_details  

GROUP BY department HAVING SUM (sales)>300;

SELECT department, SUM (sales) AS "Total Sales"  

FROM order_details  

GROUP BY sales HAVING SUM (sales)>300;

SELECT * SUM (sales) AS "Total Sales"  

FROM order_details  GROUP BY department HAVING SUM (sales)>300;

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Write a query and return all records from Table A and Table B.

SELECT Distinct *

FROM table_A  

FULL OUTER JOIN table_B  

ON table_A.A = table_B.A;  

SELECT (Distinct *)  

FROM table_A  

FULL OUTER JOIN table_B  

ON table_A.A = table_B.A;  

SELECT *  

FROM table_A  

JOIN table_B  

ON table_A.A = table_B.A;  

SELECT *  

FROM table_A  

FULL OUTER JOIN table_B  

ON table_A.A = table_B.A;  

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

We have two tables, Table-1 and Table-2. Column id is common attribute in both tables. Also, only 5 ID are matches in both tables. So, here is the question.

Table-1 has 6 tuples and table-2 has 7 tuples. If we will perform cross join on these tables then, how many tuples will return?

30

5

42

13

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?