Write a script that finds the name of the customer

Assignment Help Database Management System
Reference no: EM132083551

Note: Using SQL Server 2014. Database being used: MyGuitarShop. As far as I know, you CANNOT use 'create procedure'. Do not create your own database please.

Side note: The (1) and (2) displayed below represent the # of variables. Total variables being used in the question is '2'.

Write a script that finds (1) The name of the customer who made the largest order and (2) the value of that largest order.

Store the name and the value of the order in two different variables and then print using the two variables.

A sample print statement with the correct customer and order value "The largest order of $1678.60 was made by Christine Brown"

Hint: This problem may require you to use a table variable to store information that you will use to get to the required information. There may be multiple ways to solve this problem.

Hint: This problem may require you to use a table variable to store information that you will use to get to the required information. There may be multiple ways to solve this problem.

**Below I have included the possible information on tables and columns that may be needed.**

Customers Table; Columns: CustomerID(PK), FirstName, LastName

OrderItems Table; Columns: ItemID(PK), OrderID(FK), ProductID(FK),ItemPrice

Orders Table; Columns: OrderID(PK), CustomerID(FK) , (others dont matter)

Products Table; Columns: ProductID(PK), CategoryID(FK), ListPrice

Reference no: EM132083551

Questions Cloud

Growth of protestantism in latin american cultures : In your opinion what are some potential long-term effects of the growth of Protestantism in Latin American cultures?
How might a human service professional personal values : How might a human service professional's personal values support his or her work for social justice? In what ways might such personal values impede.
What would be the cost per unit : If these items were bought on 2/10, n/30 terms and the invoice and the freight bill were paid within the 10-day period, what would be the cost per unit
What would be the operating income or loss : Calculate the monthly operating income (or loss) that would result from changing the compensation plan to a salary of $400 per month
Write a script that finds the name of the customer : Write a script that finds (1) The name of the customer who made the largest order and (2) the value of that largest order.
Calculate the monthly operating income : Calculate the monthly operating income (or loss) that would result from a $1 per unit price increase and a $6,000 per month increase in advertising expenses
Learn more about a people by studying : Do you think you can learn more about a people by studying their material or their nonmaterial culture? Why?
Nurture explanation of human behavior : How does one's preference for a nature or nurture explanation of human behavior influence the type of social policy that one favors
Explain merton concept of the self-fulfilling prophecy : Explain Merton's concept of the self-fulfilling prophecy. What examples of Merton's concept can be found in today's media?

Reviews

Write a Review

 

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd