Chapter 7 Introduction to Structured Query Language Questions Assignment answer the following questions in the world documentations feel free to ask when i
Chapter 7 Introduction to Structured Query Language Questions Assignment answer the following questions in the world documentations feel free to ask when it is not clear.
thanks 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.
Purchase answer to see full
attachment
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.