Premium Essay

Data Base Assignment

In:

Submitted By amsj88
Words 1102
Pages 5
1. (10 pts). What is the best-selling product, based on the number of orders that contain one or more orders of that product?
(a) Gorgonzola Telino.
(b)
Select p.productname, od.productID, sum(quantity) as OrderCount from OrderDetails as od left join products as p on od.productID = p.productID group by od.productID order by sum(quantity) desc;

2. (10 pts). List the number of customers by country, from least to most.
(a)
Country NumCustomers
Ireland 1
Norway 1
Poland 1
Austria 2
Belgium 2
Denmark 2
Finland 2
Portugal 2
Sweden 2
Switzerland 2
Argentina 3
Canada 3
Italy 3
Venezuela 4
Mexico 5
Spain 5
UK 7
Brazil 9
France 11
Germany 11
USA 13

(b)
SELECT
Country,
COUNT(*) AS NumCustomers
FROM Customers
GROUP BY Country
ORDER BY NumCustomers ASC;

3. (10 pts). How many shippers are there, and how many orders has each shipper shipped?
1) How many Shippers are there?
(a) There are 3 shippers.
(b)
SELECT
COUNT(*) AS Shippers
FROM Shippers

2) How many orders has each shipper shipped?
(a) ShipperID 1 (Speedy Express) shipped 54 orders, ShipperID 2 (United Package) shipped 74 orders, and ShipperID 3 (Federal Shipping) shipped 68 orders.
(b)
SELECT
ShipperID,
COUNT(*) AS NumOrders
FROM Orders
GROUP BY ShipperID

4. (20 pts). How many customers have spent, in their lifetime, more than $500 but less than $1,000 and have at least 3 distinct orders?
(a) 9 customers spent more than $500 but less than $1,000 and have at least 3 distinct orders
(b)
i) Create a table showing each customer’s orders:
CREATE TABLE CustomerOrder AS
Select CustomerID,
Count(orderID) AS CountOrderID,
Sum(subtotal) AS CustomerSubtotal
FROM ByCustomerOrders
GROUP by CustomerID;

ii) Show customers that spent more than $500 but less than $1,000 and have at least 3 distinct orders:
SELECT *
FROM CustomerOrder
WHERE

Similar Documents

Premium Essay

Milpds Analysis Essay

...The Military Personnel Data System (MilPDS) The Military Personnel Data System (MilPDS) The Military Personnel Data System (MilPDS) is the Human Resource (HR) system that comprises each active duty Air Force, Guard and Reserve member’s personnel record as well as retirees. MilPDS is an Air Force wide military system constituting one of the world's largest Oracle HR implementations, comprising over 100 military subsystems. MilPDS is used to process pay transactions, track accountability and strength data, update promotions, assignments, reenlistments and extensions (Gildea, 2013). This paper will cover the characteristics of the users of MilPDS, features and usage of MilPDS, and the impact MilPDS has on Air Force personnel. Characteristics of the Users of the System The Air Force Personnel career field and their government employed civilians use MilPDS. The Personnel career field is equivalent to the Human Resources career in the civilian sector. Personnelist are employed within each unit on an Air Force base as well as headquarters located in San Antonio, TX. They also have their own unit on the base which is the Military Personnel Flight (MPF). Personnelist employed within units only have access to records in MilPDS for their assigned members, Personnelist who work at the MPF have access to everyone’s record assigned to the base and Personnelist assigned to Headquarters have access to everyone’s record in the Air Force and retired. All military service branches have...

Words: 1501 - Pages: 7

Premium Essay

Case Study

...Unit 1 Assignment: Case Study Read the Unit 1 Assignment Case Study. The case study involves a serial murder case and describes how the offender used technology to avoid apprehension as well as how technology was used by the police to search and apprehend the offender. For this week’s Assignment complete the tables below listing the various technologies utilized and describing how they were used to avoid apprehension as well as to locate the offender. List the technology that the offender used in the case study from Chapter 1 in your text. | Describe how the offender used the technology to avoid apprehension in each instance. | 1.Cellular phone | 1. they were able to block the numbers to private | 2.Police radio | 2. gang members would take turns monitoring it. | 3. Night vision | 3. to watch for the police | 4. call-forwarding | 4. a scheme that could use private numbers so it cannot be traced. | 5. Internet | 5. They posted messages and emails | The police used technology to search for the offender. List the different types of technology and how the technology was used to locate the offender. List the different types of technology used to search for the offender in the case study from Chapter 1 in your text. | Describe how the technology was used to locate the offender in each instance. | 1. video monitor | 1. read the label on gang items miles away | 2. night vision and thermal imaging gear | 2. being able to see if anyone was hiding...

Words: 313 - Pages: 2

Free Essay

C++ Case Statements

...CMIS102 Homework Assignment 2 (Worth 13% of your grade) Student Name: Ariel Cintron Class/Section: CMIS102 / 6383 Professor Name: Ronald Mcfarland Assignment due date: Feb 01 2012 Problem definition: Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet. A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. The input consists of computer base price (CompPrice), the CPU choice (CPU_choice), the RAM choice (RAM_choice), and the Graphics Card choice (VideoCard_choice). Once the customer has entered a choice of an option, the program will determine the corresponding cost of that option: CPU_cost, RAM_cost, VideoCard_cost. The only item output is the computer selling price (ComputerPrice). To determine the ComputerPrice, the following computation is: ComputerPrice = CompPrice + CPU_cost + RAM_cost + VideoCard_cost. B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Things the program must do: 1. Input the computer base price 2. Process the various options to compute the additional costs 3. Total all the costs 4. Display the final selling price The main Module will contain the following submodules: Compute_CPU_Cost Compute_RAM_Cost ...

Words: 908 - Pages: 4

Premium Essay

Gsm Architecture

...GSM Call Flow (GSM Originating Call) Cell Mobile Station User Mobile Mobile Network Base Stations NSS BSS MSC VLR Fixed Network PSTN PSTN EventHelix.com/EventStudio 2.5 01-Aug-04 18:02 (Page 1) LEG: GSM Mobile Originated Call This scenario describes the call setup for a GSM originating call. A mobile user calling a land line subscriber is covered here. Copyright © 2000-2004 EventHelix.com Inc. All Rights Reserved. Dial the called person's number Send Button Begin RR Connection Establishment The user keys in the phone number for the landline subscriber and .. .. presses the Send button Call related information needs to be transported from the mobile phone to the Mobile Switching Center (MSC). This requires the establishment of a Radio Resource (RR) connection to MSC. The first phase of the call setup just sets up this RR connection. RR CHANNEL REQUEST RACH RR connection establishment is triggered by sending the Channel Request message. This message requests the Base Station System (BSS) for allocation for radio resources for the RR connection setup. The mobile now waits for an assignment on the Access Grant Channel (AGCH). At this point the mobile is listening to the AGCH for a reply. Note: The RR CHANNEL REQUEST is sent on a Random Access Channel (RACH). This is a slotted aloha channel that can be used at random, without any coordination between the mobiles. Any mobile can transmit on this channel whenever it wishes. If two mobiles transmit on the...

Words: 1487 - Pages: 6

Premium Essay

Securing Sql Server

...Best practices for Disaster Recovery. Research Assignment 9 Robert Montini (18738519) Mr. Troianos Research Assignment 9 Robert Montini (18738519) Mr. Troianos Best practices for securing SQL Server. Best Practices for Disaster Recovery. Bad things happen, but to a corporation, entity or country, a bad thing happening to its server is worse than bad. It’s a Disaster. The loss of crucial information, records and vital statistics can bring the death to whatever the data base is associated to. That is why Disaster Recovery is one of the most prioritized tasks a data base team may face. Given that the creating a data base is in itself the major goal, protecting that data base should a disaster befall it is as important. There are numerous ways to do this. This paper deals with the best practices of how to accomplish this. The first thing should be to make a backup plan. This should: 1. A computer where the backup will be stored 2. What programs that will be used to back up the database 3, The computers to be backed up 4. A schedule of when to backup new data to the data base 5. The offsite location where the data base recovery data will be stored The second practice is to document all the changes that are made to the database. These include service packs, hot fixes and QFEs that have been applied. This is crucial for getting a data base restored to its original state should a disaster occur. These steps should be implemented to help prevent or minimize the...

Words: 1274 - Pages: 6

Premium Essay

Calculate the Total Price to Purchase All the Components Required to Build a State-of-the-Art Gaming Computer from Components Available on the Internet.

...Xonar DX 7.1 $90 Graphics Card MSI N650-MD1GD5/OC GeForce GTX 650 1GB $110 Operating System Microsoft Windows 7 Ultimate $190 BaseCost = 1, 028 RAM | Purchase Code | Price | G.SKILL Ripjaws Series 4GB | G | $48 | G.SKILL Ripjaws Series 8GB | R | $75 | G.SKILL Ripjaws X Series 16GB | X | $155 | DVD | Purchase Code | Price | SAMSUNG Black 18X DVD-ROM | S | $17 | SuperMicro Black 8X DVD-ROM | M | $51 | HP Black SATA Slim DVD-ROM | H | $74 | Monitor | Purchase Code | Price | Asus VE248H Black 24" 2ms Full HD HDMI LED | A | $185 | Asus VE228H 21.5" Full HD HDMI LED | V | $135 | Asus VE278Q Black 27" 1920x1080 2ms Full HD HDMI LED | L | $245 | 1. A.    Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. For the state of the art gaming computer, the user has already identified fixed items that will be required on any computer, regardless of the other options. This will be identified by the input, BaseCost ($1,028). The other inputs for this program are the ram cost (RamChoice), DVD cost (DvdChoice), and monitor (MonitorChoice). One the options are decided on, the program must determine the cost of these items. The output for the program will be the total of the computer, TotalCost. TotalCost will be calculated by BaseCost + RamCost + DvdCost + MonitorCost.   1. B.     Program Design – Following the directions in the...

Words: 775 - Pages: 4

Free Essay

What Is Motherboard

...What is a Motherboard? The Motherboard is the main circuit board inside the PC. It holds the CPU and memory, provides expansion slots for peripherals, and, whether directly or indirectly, connects to every part of the PC. The essential motherboard make-up includes the chipset (known as the “glue logic”), some code in ROM and the various wired interconnections between the components know as buses. The chipset is fundamental, and controls how the motherboard interacts with everything else in the system. A good chipset can be more important than the power of CPU or the amount of RAM. The ROM code includes the BIOS, which has user-changeable options for how the motherboard operates with integral and connected devices. The buses are the electrical wires that connect everything together. Motherboard designs use many different buses to link their various components. For instance, wide, high-speed buses are difficult and expensive to produce. The signals travel at such a rate that even distances of just a few centimetres cause timing problems, while the metal tracks on the circuit board act as miniature radio antennae, transmitting electromagnetic noise that introduces interference with signals elsewhere in the system. For these reasons, design engineers try to keep the fastest buses confined to the smallest area of the motherboard and use slower, more robust buses for other parts. Types of Slots on a Motherboard Motherboards are the backbone of a computer, holding different...

Words: 3337 - Pages: 14

Premium Essay

Logistic

...RMIT International University Vietnam Bachelor of Commerce Program ASSIGNMENT COVER PAGE Your assessment will not be accepted unless all fields below are completed Subject Code: | OMGT2085 | Subject Name: | Intro to Logistics & Supply Chain Mgt | Location where you study: | RMIT Vietnam – Hanoi Campus | Title of Assignment: | Practical Assignment Report | File(s) Submitted | Practical Assignment Report (1).docx | Student name: | Tran Bao Ngoc | Student Number: | S3324103 | Student Email Address: | S3324103@rmit.edu.vn | Learning Facilitator in charge: | Buatier de Mongeot, Matteo | Assignment due date: | 16/04/2012 | Date of Submission: | 15/04/2012 | Late Submission Approval | Yes | Number of pages including this one: (Please number your pages like this: page 1 of 7, page 2 of 7, etc) | 9 | Word Count: (Main Content) | 1579 words | Practical Assignment Report Tran Bao Ngoc – s3324103 Profile of the company: Nhat Nam is one of very few company in Vietnam started to vanguard in supermarket field in the North of Vietnam. In 1997, Fivimart – the name of very first Nhat Nam’s supermarket system was launched. It received very good response as well as valuations from the capital’s citizens. Nowadays, they have over 10 supermarkets in Hanoi. Since the very first start, Fivimart invested a lot of financial resources to buy model equipment with high quality and up-to-date regularly (Fivimart, 2011). Fivimart supermarkets...

Words: 2205 - Pages: 9

Premium Essay

Mgmt 532 Unit 4 Assignment

...Running Head: 2.4 Assignment: Data Assignment 3 2.4 Assignment: Data Assignment ERAU MGMT 532 By James Rock 1) Even though the complete survey is not included in the case, summarize how the closed-ended and open-ended questions provided valuable customer insights for FIR. The customer insights that were valuable for FIR were found in the arbitrary specimen of one thousand client studies. The accommodation of not having individual contact with administration agents to examine issues should they emerge one of the top reactions. Web-based banking gave customers unlimited access to their accounts at any time, along with the convenience of paying bills online, thus alleviating the need to use the post office. One of the major inconveniences was no access to ATMs within the...

Words: 426 - Pages: 2

Premium Essay

Framingham Heart Study

...Assignments number two, it was completed from the Framingham Heart Study, and this analysis will discuss the results from statistical procedures made in SAS. For this assignment we choose two variables in order to compare the differences in between possible correlation of heart disease among different sex. First, we started with cholesterol, in which we found the Mean (227), Standard Deviation (44.94) and Mode (200). Base on the results for this variable we can conclude that there is an above average cholesterol level. We found that more than fifty percent of the sample population was above the normal levels. However, the graph that represented the results demonstrated a symmetrical shape. The next variable choose to analyze data was systolic...

Words: 325 - Pages: 2

Premium Essay

Cis 440 Hw 1

...Name: Mohammed Al-Hashim Dated: 1/21/14 ------------------------------------------------- Class: CIS 440 Assignment: HW 01 Prepare a list of all the materials you find therein. The Home screen of the Teradata website contains the following items 1. On the top of the page you find the name of the website and four links named as follows a. Profile: Contains information regarding the account holder. b. Favorites: What resources on gathers can be saved here. c. History: Browse previously searched articles and researched data. d. Sign-out: Loges you out of the data base. 2. Near the middle of page we can see several buttons such as e. Library: Is a very wide data base that contains much information to be researched. The library can be relied on for information recourses that could aid students in this course and could also help achieve higher grades in exams by using the different resources in the library. f. Software: Here you can find access to different software that can aid in strategic planning using highly developed software. g. Community: this button contains information for students regarding future employment and job opportunities. Here you can be connected with others such with the same interests as one’s self and take advantage of the possible connection you could make to help you become successful. h. Recourses: Here you can find other recourses relating to computer systems ...

Words: 502 - Pages: 3

Free Essay

Assignment 1

...ASSIGNMENT FRONT SHEET No.1 Qualification | BTEC Level 5 HND Diploma in Business | Unit number and title | Unit6: Business Decision Making | Assignment due | | Assignment submitted | | Learner’s name | | Assessor name | | Learner declaration:I certify that the work submitted for this assignment is my own and research sources are fully acknowledged. | Learner signature | | Date | | Grading grid P1.1 | P1.2 | P1.3 | P2.1 | P2.2 | P2.3 | M1 | M2 | M3 | D1 | D2 | D3 | | | | | | | | | | | | | Assignment title | | In this assignment, you will have opportunities to provide evidence against the following criteria. Indicate the page numbers where the evidence can be found. | Assessment criteria | Expected evidence | Task no. | Assessor’s Feedback | LO1. Be able to use a variety of sources for the collection of data, both primary and secondary | 1.1. Create a plan for the collection of primary and secondary data | Part of report where student individually create the plan to collect primary data and the source of secondary data | 1 | | 1.2. Present the survey methodology and sampling frame used | Part of report where student individually:- Choose a suitable survey methodology for the research: postal questionnaires or interviews with explanations of decisions made- Base on that method, choose a suitable type of sampling method with explanations of decisions made | 2 | | 1.3. Design a questionnaire for the problem | Part of report...

Words: 422 - Pages: 2

Premium Essay

Marketing Research

...Marketing Research Assignment – Wendy´s Case Martin Meister – Boston University THE WENDY´S CASE A DEMOSTRATION HOW MARKETING RESEARCH AND ANALYSIS CAN HELP RESOLVING A MANAGEMENT DECISION PROBLEM Martin Meister – martinmeisterg@yahoo.com Boston University - MET AD 856 fall 2012 – Professor Vladimir Zlatev February 27, 2012 1 Marketing Research Assignment – Wendy´s Case Martin Meister – Boston University Table of Contents Introduction ...................................................................................................................................................... 3 1. - Problem Definition ....................................................................................................................................... 3 a. - Background to the problem...................................................................................................................... 3 b. - Statement to the problem........................................................................................................................ 4 2. - Approach to the Problem ............................................................................................................................. 5 3. - Research Design ........................................................................................................................................... 8 a. - Information needs ........................................................................................

Words: 6651 - Pages: 27

Premium Essay

Atm Assignment

...[pic] |MASTERS DEGREE ASSIGNMENT SPECIFICATION | |Student name: |      |Student P number: | | |Programme: |MBA | |Module: |     ATM |Module Level: |7 | |Module code: |M6X9136 |Contribution to Overall |100% | | | |Module Assessment (%): | | |Lecturer: |Steve Griffiths |Internal Verifier: |Caroline Jawad | |Assignment Title: |Learning Logs |Assignment No (x of x): |1 of 1 | |Hand Out Date: |     Sept 2012 |Submission deadline: |16 November 2012 | |Referencing: |In the main body...

Words: 3036 - Pages: 13

Premium Essay

Mt Excel Gfwuihvl

...Instructions- 1. There are 2 deliverables for this assignment- a) An excel file with the necessary computations. b) A word doc with the corresponding explanations. (For the question involving macro, a separate file could be submitted. However, a single excel file is preferred). 2. Solve each question in a separate sheet in one excel file. 3. You’re required to state all your assumptions in the first sheet of the excel file. These assumptions should be written for all the sub-parts separately, however in the same sheet, wherever applicable. 4. Maintain uniformity in structure and formatting. The assignment would be penalized for lack of hygiene. 5. Name all your sheets appropriately. 6. Naming Convention for the file Name_Roll_No_Section.doc/.xls. Example- Hermione_Granger_91023_G.xls Assignment- i) Use column V to create a new character variable of length 10- ABCDEFGHIJ where AB=Region, CD=Province, E=Product Category, FG=Customer Segment, H=Ship Mode, I=Order Priority, J=Product Container. (You’re free to use your own nomenclature. Specify the same in the assumptions sheet. Eg- Use initial 1(or 2) characters of the corresponding variable.) ii) Summarize the data using a pivot table by region and province. Subsequently, find the province with highest profit per shipment and highest profit per Unit. iii) Create a pivot table where you provide a summary of sales, cost and profit statistics. How will you summarize? State the variables used...

Words: 607 - Pages: 3