Question: These are queries that use the full Red Cat Database as shown in Figure 3.1. To do these queries you cannot use the SimplifiedSales database.

These are queries that use the full Red Cat Database as shown in Figure 3.1. To do these queries you cannot use the SimplifiedSales database. You must use the full Red Cat tables of Customer, Sale, SaleItem, Product, Manufacturer, and Employee tables. For each information request below, formulate a single SQL query to produce the required information. In each case, you should display only the columns requested.

1. Show product information for sneakers that cost less than $50 and have a name that contains "canvas". Show the product name, its composition, and its list price.

2. Show the manufacturername,city, and state for all manufacturers located in the states of Texas(TX), New York(NY), Arizona(AZ). Order the output alphabetically by state, and then by manufacturername.

3. Show the customer first name, customer last name, city, and state for all customers who live in Tulsa or Oklahoma City. Also, include customers from Oklahoma (state='Ok') where the city begins with the letter 'C'.

4. Show the customer's firstname, customer's last name, customer's city (call it 'CustCity'), product name, list price for all products made by manufacturers in Texas ( state = 'TX') and purchased by customers in Mesa or Belleville.

5. For white sandals, how does the current list price compare to the price at which products have sold? Show the product name, the list price, the sale price, and a newly calculated column named "discount," which is the list price - sale price. Show the unique records in descending order by the product name.

6. What is the total count of manufacturers from Texas (State = 'TX')? Your query should display one column named 'Texas_count" (Hint: create an alias "Texas_count")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!