STRUCTURED QUERY LANGUAGE TEST

Progress

1.

What is the main language of  Transact-SQL?

2.

What is the SQL query used to retrieve all the data from the customer table?

3.

To Create a new database __________ Command is used

4.

Which of the following is a valid SQL type?

5.

Which file type is used for database backup?

6.

The SQL WHERE clause used for 

7.

The _______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.

8.

What is the significance of “ORDER BY” in the following MySQL statement?

SELECT emp_id, fname, lname  
FROM person    
ORDER BY emp_id;  

9.

Find the name of these cities with temperature and condition whose condition is neither sunny nor cloudy

10.

You can delete a view with _____________ Command.

11.

Select ID, name, dept name, salary * 1.1 where instructor;

The query given below will not give an error. Which one of the following has to be replaced to get the desired output?

12.

How to delete the Customer name of Alfreds Futterkiste (CustomerID is 1) from the Customers table?

13.

Find all the cities whose humidity is 89

14.

What is the significance of the statement of the below query?

SELECT branch_name, COUNT (DISTINCT customer_name)     
FROM depositor, account           
WHERE depositor.account_number = account.account_number   
GROUP BY branch_id          

15.

What is the significance of the statement “GROUP BY d.name” in the following MySQL statement?

SELECT d.name, COUNT (emp_id) emp_no  
FROM department d INNER JOIN Employee e
ON d.dept_id=e.emp_id    
GROUP BY d.name    

16.

We can use one table to create another table using the below query. True or False ?

CREATE TABLE TestTable AS

SELECT customername, contactname

FROM customers;

17.

If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

18.

Which of the following query is correct for selecting the name of the staff from ''staffinfo'' table where salary is 10000 or 25000?

19.

Which one is not used in SQL?

20.

Which syntax is used for Drop Index (idx_pname) from the Person table in MYSQL?

21.

With SQL, how do you select all the records from a table named "Persons" where the value of the column "Firstname" ends with an ''a''?

22.

What is the significance of the statement “HAVING COUNT (emp_id)>2” in the following MySQL statement?

SELECT d.name, COUNT (emp_id) emp_no  
FROM department d INNER JOIN Employee e  
ON d.dept_id=e.emp_id      
GROUP BY d.name      
HAVING COUNT (emp_id)>2    

23.

Analyze the following Query and Mark the answer whether it's a correct query or not?

Select OrderID, Shipdate
From Orders  
Where CustomerID=20
Order by Shipdate;

24.

Which SQL keyword is used to sort the result-set?

25.

Which SQL Query is used for updating the ContactName in the Customers table?

26.

What can be the condition in the "WHERE" clause in a SQL query?

27.

Select ________ dept_name from instructor; 

Here which of the following displays the unique values of the column?

28.

Select ID, GPA from student grades order by GPA ____________.

In order to give only 10 ranks, on the whole, we should use.

29.

Find the names of the countries whose condition is sunny

30.

 Syntax for create a  views is _______

31.

Can you validate the statement?

An ORDER BY can be used in a subquery.

True or False?

32.

Which of the following clause is mandatorily used in a sub-query?

33.

What is "Subquery"?

34.

Which of the following is true about sub-queries?

35.

Can you validate the statement?

A subquery can be used anywhere an expression is allowed.

True or False?

36.

Student (ID, Name, Dept_name, Total_credit)

In this above query which attribute form the Primary Key?

37.

How many Primary Keys can have in a table?

38.

Can you validate the statement?

A column with a Unique key has duplicate values.

True or False?

39.

Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?

40.

Which of the following do you need to consider when you make a table in SQL?

41.

Can you validate the statement?

Alias is used in Joins.

True or False?

42.

List all orders, showing order number, customer name and credit limit of a customer.

Orders Table:  
Order_Number, Customer, Product_Amount
Customers Table:  
Customer_Number, Customer_Name, Credit_Limit

 Which of the below query satisfy the above question?

43.

Analyze the following tables and output and choose the correct query to achieve the output.

 

44.

How many tables may include with a join? 

45.

What is the syntax for joining two tables? Pick Two

46.

Analyze the following tables and output and choose the correct query to achieve the output.

47.

Analyze the following tables and output and choose the correct query to achieve the output.

48.

What are the joins available in SQL?

49.

Where are Joins used?

50.

Statement: Join for each row of one table to every row of another table.

Which Join?

51.

Which of the following is incorrect SQL?

52.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT AVG(Salary) from Salesemployee 
WHERE Gender = 'Female';  

 

53.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(Salary) from Salesemployee 
where name Like 'S%';

 

54.

Use below table (Salesemployee)  and answer the following question

What is the output of the following query?

SELECT SUM(Salary) from Salesemployee     
WHERE Gender = 'Male';      
        

55.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT Count(Salary) from Salesemployee 
where name Like 'T%';  

 

56.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?
SELECT AVG(Salary) from Salesemployee 
where Dept = ' HR';    

 

57.

In SQL - these functions - AVG, MIN, MAX, COUNT are called as ___________

58.

Use below table (Salesemployee) and answer the following question
What is the output of following query ?  
SELECT MIN(Salary) from Salesemployee   
WHERE Employee_ID % 2 != 0 ;    

 

59.

“COUNT” keyword belongs to which categories in MySQL?

60.

Which SQL keyword is used to retrieve the highest value? 

Assessment complete! Thank you for you time.
We are redirecting you to the result page, Please click on 'SUBMIT'