Weatherford College Databases Essay
Description
1.Explain why it would be preferable to use a DATE data type to store date data instead of a character data type.
2.In a SELECT query, what is the difference between a WHERE clause and a HAVING clause?
3.Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, what is the query output for the UNION query? (List the query output.)
4.Given the employee information in the previous Question, what is the query output for the UNION ALL query? (List the query output.)
5.If you have a Products table and you want to increase the Price by 15% for all products that have a price greater than $15.00, write the update statement. (ProductID, Price)
6.For the same Products table write a query that will count all the products with a Price greater than $15, and the count is greater than 3.
7.What is a trigger, and what is its purpose?
8.What is a stored procedure, and why is it particularly useful?
9.Explain why it might be more appropriate to declare an attribute that contains only digits as a character data type instead of a numeric data type.
Using the data from https://faculty.cengage.com/titles/9781337627900?q=resources, run the commands in the Ch07_SaleCo_SQL.txt file. This will create the tables you need, and add the data. Answer the next 2 questions.
10.Create a Correlated subquery to Show Each Customer (Cus_Code, CUS_LNAME, CUS_LNAME) and their total purchases
11.Create query that will give you the same results as the previous question, but without using a subquery.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."