Chat with us, powered by LiveChat Chapter 7 Introduction to Structured Query Language Questions Assignment | All Paper
+1(978)310-4246 credencewriters@gmail.com
  

answer the following questions in the world documentations feel free to ask when it is not clear.thanks
sql_lab_1_.doc

Unformatted Attachment Preview

Chapter 7 An Introduction to Structured Query Language (SQL)
Chapter 7
Lab Assignment
Introduction to Structured Query Language (SQL)
1. In a SQL query, what is the difference between a WHERE clause and a SELECT clause?
2. Rewrite the following WHERE clause without the use of the IN special operator.
WHERE V_STATE IN (‘TN’, ‘FL’, ‘GA’)
3. Explain the difference between an ORDER BY clause and a GROUP BY clause.
4. Explain why the two following commands produce different results.
SELECT DISTINCT COUNT (V_CODE) FROM PRODUCT;
SELECT COUNT (DISTINCT V_CODE) FROM PRODUCT;
5. What is the difference between the COUNT aggregate function and the SUM aggregate
function?
Chapter 7 An Introduction to Structured Query Language (SQL)
Figure P7.1 Structure and contents of the Ch07_ConstructCo database
Note that the ASSIGNMENT table in Figure P7.1 stores the JOB_CHG_HOUR values as an
attribute (ASSIGN_CHG_HR) to maintain historical accuracy of the data. The
JOB_CHG_HOUR values are likely to change over time. In fact, a JOB_CHG_HOUR change will
be reflected in the ASSIGNMENT table. And, naturally, the employee primary job assignment
might change, so the ASSIGN_JOB is also stored. Because those attributes are required to
maintain the historical accuracy of the data, they are not redundant.
Chapter 7 An Introduction to Structured Query Language (SQL)
1. Write the SQL code to enter the first two rows.
2. Assuming the data shown in the EMP_1 table have been entered, write the SQL code that will
list all attributes for a JOB_CODE of 502.
3. Write the SQL code to delete the row for the person named William Smithfield, who was hired
on June 22, 2004, and whose job code classification is 500. (Hint: Use logical operators (AND)
to include all of the information given in this problem.)
Chapter 7 An Introduction to Structured Query Language (SQL)
4. Write the SQL code required to list all employees whose last names start with Smith. In other
words, the rows for both Smith and Smithfield should be included in the listing. Assume case
sensitivity.
5. Write the SQL code that will produce a listing for the data in the EMP_1 table in ascending
order by the EMP_LNAME.
6. Write the SQL code that will list only the distinct job codes found in the EMP_1 table.

Our essay writing service fulfills every request with the highest level of urgency.
attachment

error: Content is protected !!