Tuesday, June 12, 2018

Upwork ANSI SQL TEST 2018

Hello Freelancer, Get the ANSI SQL TEST of Latest version 2018. We are ready here to provide your desire upwork test answer. We already tested all exam test information Available include on here. So Dear, Why Late? Read the below full exam test and get more information from our website. 

Upwork ANSI SQL TEST 2016

1. The simplest query must include at least________ and _________.

Answers:
  1. A select clause
  2. A where clause
  3. A from clause
  4. A group by clause
  5. A having clause
  6. An order by clause
2. Which of the following are aggregate functions in SQL?
Answers:
  1. Avg
  2. Select
  3. Order By
  4. Sum
  5. Union
  6. Group by
  7. Having
3. Which logical operator can reverse the result?
Answers:
  1. AND
  2. OR
  3. NOT
  4. ANY
4. What are the programs that execute automatically whenever DML operations are performed on tables called?
Answers:
  1. Triggers
  2. Procedures
  3. Functions
  4. None of the above
5. The primary key index does not allow ________ data in a field.
Answers:
  1. Numeric
  2. Characte
  3. Date
  4. Null
  5. Duplicate
  6. All of the above
6. Which character function should be used to return a specified portion of a character string?
Answers:
  1. CONCAT
  2. LENGTH
  3. SUBSTR
  4. INITCAP
7. Which one of the following correctly selects rows from the table myTable that have null in column column1?
Answers:
  1. SELECT * FROM myTable WHERE column1 is null
  2. SELECT * FROM myTable WHERE column1 = null
  3. SELECT * FROM myTable WHERE column1 EQUALS null
  4. SELECT * FROM myTable WHERE column1 NOT null
  5. SELECT * FROM myTable WHERE column1 CONTAINS null
8. What does the following Update statement do?
Update OrderTable set OrderDiscount=OrderDiscount*1.10
Answers:
  1. Increases OrderDiscount of first row by 10%
  2. Increases OrderDiscount of all rows by 10%
  3. Does nothing without where clause
  4. Gives an error due to lack of where clause
9. Consider the following table structure of students:
rollno number(4) 
name varchar(20) 
course varchar(20) 
What will be the query to display the courses in which the number of students 
enrolled is more than 5?
Answers:
  1. Select course from students where count(course) > 5;
  2. Select course from students where count(*) > 5 group by course;
  3. Select course from students group by course;
  4. Select course from students group by course having count(*) > 5;
  5. Select course from students group by course where count(*) > 5;
  6. Select course from students where count(group(course)) > 5;
  7. Select count(course) > 5 from students;
  8. None of the above
10. Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book on a scale of 1 to 10)
Language (such as French, English, German etc)
Subjects
———
SubjectId
Subject (such as History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which Authors have written at least 1 book with a popularity rating of less than 5?
Answers:
  1. select authorname from authors where authorid in (select authorid from books where popularityrating<5)
  2. select authorname from authors where authorid in (select authorid from books where popularityrating<=5)
  3. select authorname from authors where authorid in (select BookId from books where popularityrating<5)
  4. select authorname from authors where authorid in (select authorid from books where popularityrating in (0,5))
11. Examine the code given below:
SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000
Which of the following statements is correct with regard to this code?
Answers:
  1. It returns employees whose salary is 50% more than $23,000
  2. It returns employees who have 50% commission rate or salary greater than $23,000
  3. It returns employees whose salary is 50% less than $23,000
  4. None of the above
12. Which component of an RDBMS validates the syntax of the user’s query?
Answers:
  1. Query Parse
  2. The Database Manage
  3. Query Optimization
  4. Database Administrato
13. What does MOD() function do?
Answers:
  1. Returns the remainder after division
  2. Modifies the column definition
  3. Modifies the definition of a table
  4. None of the above
14. Which of the following is not a SQL operator?
Answers:
  1. Between..and..
  2. Like
  3. In
  4. Is null
  5. Having
  6. Not in
15. Which of the following operation is invalid with respect to dates?
Answers:
  1. date + numbe
  2. date * numbe
  3. date – numbe
  4. date – date
  5. date + number/24
16. What does the term DDL stand for?
Answers:
  1. Data Description Language
  2. Dynamic Data Language
  3. Data Definition Language
  4. Data Derived Language
  5. Descriptive Data Language
17. Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book on a scale of 1 to 10)
Language (such as French, English, German etc)
Subjects
———
SubjectId
Subject (such as History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which German books(if any) are more popular than all the French?
Answers:
  1. select bookname from books where language=’German’ and popularityrating = (select popularityrating from books where language=’French’)
  2. select bookname from books where language=’German’ and popularityrating > (select popularityrating from books where language=’French’)
  3. select bookname from books where language=’French’ and popularityrating > (select max(popularityrating) from books where language=’German’)
  4. select bookname from books where language=’German’ and popularityrating > (select max(popularityrating) from books where language=’French’)
18. Consider the following tables:
Books
——
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book on a scale of 1 to 10)
Language (such as French, English, German etc)
Subjects
———
SubjectId
Subject (such as History, Geography, Mathematics etc)
Authors
——–
AuthorId
AuthorName
Country
What is the query to determine which is the most popular book written in French?
Answers:
  1. select bookname from books where language=’French’ and popularityrating = (select max(popularityrating) from books where language=’French’)
  2. select bookname from books where language=’French’ and popularityrating = (select max(popularityrating) from books Having language=’French’)
  3. select bookname,max(popularityrating) from books where language=’French’ and max(popularityrating)
  4. select bookname,max(popularityrating) from books where language=’French’ having max(popularityrating)
19. How many foreign key constraints can a table have?
Answers:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. None of the above
20. When a table is dropped using a simple DROP statement, SQL performs some more operations simultaneously, select all the valid operations?
Answers:
  1. Removes all rows from the table
  2. Drops all the table’s indexes
  3. Removes all dependent views
  4. Removes all dependent procedures
21. You want to display the titles of books that meet the following criteria:
1. Purchased before November 11, 2002 
2. Price is less than $500 or greater than $900
You want to sort the result by the date of purchase, starting with the most recently bought book. 
Which of the following statements should you use?
Answers:
  1. SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < ’11/11/2002′ ORDER BY purchase_date;
  2. SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date< ’11/11/2002′ ORDER BY purchase_date ASC;
  3. SELECT book_title FROM books WHERE (price < 500 OR price >900) AND purchase_date DESC;
  4. SELECT Book_title FROM books WHERE (price < 500 OR price >900) AND purchase_date<’11/11/2002′ ORDER BY purchase_date DESC;
22. Which operator will be evaluated first in the following statement:
select (age + 3 * 4 / 2 – 8) from emp
Answers:
  1. +
  2. /
  3. *
23. What clause should be used to display the rows of a table in ascending order of a particular column?
Answers:
  1. Where
  2. Order By
  3. Group By
  4. Having
  5. First Group By and then Having
  6. Like
  7. Between
24. What is the correct order of clauses in the select statement? 
1 select
2 order by
3 where
4 having
5 group by
Answers:
  1. 1,2,3,4,5
  2. 1,3,5,4,2
  3. 1,3,5,2,4
  4. 1,3,2,5,4
  5. 1,3,2,4,5
  6. 1,5,2,3,4
  7. 1,4,2,3,5
  8. 1,4,3,2,5
25. Which of the following statements is true?
(a)The Insert statement creates new rows
(b)The Update statement modifies the table structure
Answers:
  1. only (a) is true
  2. only (b) is true
  3. oth (a) and (b) are true
  4. oth (a) and (b) are false
26. A table Students has a column called name which stores the names of the students. What will be the correct query to display the names of the students in reverse order?
Answers:
  1. Select name from students reverse;
  2. Select name from students reverse name;
  3. Select name from students order by name descending;
  4. Select name from students order by name reverse;
  5. Select name from students order by name desc;
  6. Select desc name from students;
  7. Select reverse name from students;
27. Choose the appropriate query for the Products table where data should be displayed primarily in ascending order of the ProductGroup column. Secondary sorting should be in descending order of the CurrentStock column.
Answers:
  1. Select * from Products order by CurrentStock,ProductGroup
  2. Select * from Products order by CurrentStock DESC,ProductGroup
  3. Select * from Products order by ProductGroup,CurrentStock
  4. Select * from Products order by ProductGroup,CurrentStock DESC
  5. None of the above
28. Examine the two SQL statements given below:
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC
What is true about them?
Answers:
  1. The two statements produce identical results
  2. The second statement returns an error
  3. There is no need to specify DESC because the results are sorted in descending order by default
29. The overall logical structure of a database can be expressed graphically by:
Answers:
  1. Data Flow Chart
  2. Flow Chart
  3. Directed Chart
  4. Entity-Relationship Diagram
  5. None of the above
30. In an RDBMS, which term is used to describe ‘data about data’?
Answers:
  1. Meta data
  2. Data dictionary
  3. Database
  4. None of the above


Finally no more words require about the ANSI SQL TEST  information in this session of this content. If you are require knowing more, Please ask to us via our contact us form or comment box. Please make sure that, you don’t send Personal information via the Comment box. Thanks for Being with us.

No comments:

Post a Comment