a. Create Database name salesorderDB. (Take screenshot.) b. Create Tables salesman, customer and order. (Take screenshot.)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a. Create Database name "salesorderDB". (Take screenshot.) b. Create Tables "salesman", "customer" and "order". (Take screenshot.) salesman salesman id 5001 5002 5005 5006 5003 5007 name James Hoog Nail Knite www.w Pit Alex Mc Lyon Lauson Hen wwwwwww Paul Adam order order no 70001 70009 city New York Paris London Paris Rome commission 150.5 270.65 PA 0.15 0.13 0.11 0.14 0.12 0.13 customer customer id wwwwwwww 3002 3005 3001 3004 3007 3009 3008 3003 purch amt order date 2016-10-05 2016-09-10 2016-10-05 customer name city wwwwwwwwwwwww Nick Rirando Graham Zusi Brad Guzan Fabian Johns Brad Davis Geoff Camero wwwwwww Julian Green New York California London Paris New York Berlin London Jozy Altidor Moncow www customer id 3005 3001 2002 grade 100 200 300 200 100 300 200 5002 salesman id 5001 5001 5002 5006 5001 salesman id 5002 5007 100 ( C 71. order order no 70001 70009 70002 70004 70007 70005 70008 3008 3003 purch amt order date 150.5 270.65 65.26 110.5 948.5 2400.6 5760 Julian Green London Jozy Altidor Moncow www customer id 2016-10-05 3005 2016-09-10 3001 2016-10-05 3002 2016-08-17 3009 2016-09-10 3005 2016-07-27 3007 2016-09-10 3002 c. Insert the records as given in the above tables. (Take screenshot.) 300 200 salesman id 5002 5001 5002 5007 5002 5001 5001 d. Display the name and city of all the salesman. (Take screenshot.) e. Delete the record from salesman where salesman_id is "5005". (Take screenshot.) f. Update city from London to Berlin in table customer where customer_id is "3008". (Take screenshot.) g. Alter table salesman and add a new column "email_id" and add the email id of all the salesman in the format firstname.city@yahoo.com. (Take screenshot.) Main Content h. Display the records from order where purch_amt is greater than 500. (Take screenshot.) i. Find all the details from order table and arrange the data according to dates in ascending order by using "ORDER BY". (Take screenshot.) j. Find the commission according to the city by using "GROUP BY". (Take screenshot.) k. Show all the names from the customers with name start from 'J'. (Take screenshot.) 1. Display all customer details from customer table where the grade is between 200 to 300 by using BETWEEN. (Take screenshot.) K m. Write a SQL statement that count all the orders for the date "2016-09- 10" using COUNT function. (Take screenshot.) n. Find the highest purchase amount order by each salesman with their customer_id and highest purchase amount by using MAX and GROUP BY clause in order table. (Take screenshot.) o. Display the minimum purchase amount from table order using MIN function. (Take screenshot.) p. Find the average commission from table salesman using AVG function. (Take screenshot.) q. Find the total purchase amount from order table using SUM function. (Take screenshot.) r. Find the highest purchase amount from Order table where customers have the highest purchase amount in the day more than 2000 using HAVING and MAX. (Take screenshot.) s. Rename database from "salesorderDB" to "salescustomerorderDB" using rename command. (Take screenshot.) t. Drop table order using DROP command. (Take screenshot.) a. Create Database name "salesorderDB". (Take screenshot.) b. Create Tables "salesman", "customer" and "order". (Take screenshot.) salesman salesman id 5001 5002 5005 5006 5003 5007 name James Hoog Nail Knite www.w Pit Alex Mc Lyon Lauson Hen wwwwwww Paul Adam order order no 70001 70009 city New York Paris London Paris Rome commission 150.5 270.65 PA 0.15 0.13 0.11 0.14 0.12 0.13 customer customer id wwwwwwww 3002 3005 3001 3004 3007 3009 3008 3003 purch amt order date 2016-10-05 2016-09-10 2016-10-05 customer name city wwwwwwwwwwwww Nick Rirando Graham Zusi Brad Guzan Fabian Johns Brad Davis Geoff Camero wwwwwww Julian Green New York California London Paris New York Berlin London Jozy Altidor Moncow www customer id 3005 3001 2002 grade 100 200 300 200 100 300 200 5002 salesman id 5001 5001 5002 5006 5001 salesman id 5002 5007 100 ( C 71. order order no 70001 70009 70002 70004 70007 70005 70008 3008 3003 purch amt order date 150.5 270.65 65.26 110.5 948.5 2400.6 5760 Julian Green London Jozy Altidor Moncow www customer id 2016-10-05 3005 2016-09-10 3001 2016-10-05 3002 2016-08-17 3009 2016-09-10 3005 2016-07-27 3007 2016-09-10 3002 c. Insert the records as given in the above tables. (Take screenshot.) 300 200 salesman id 5002 5001 5002 5007 5002 5001 5001 d. Display the name and city of all the salesman. (Take screenshot.) e. Delete the record from salesman where salesman_id is "5005". (Take screenshot.) f. Update city from London to Berlin in table customer where customer_id is "3008". (Take screenshot.) g. Alter table salesman and add a new column "email_id" and add the email id of all the salesman in the format firstname.city@yahoo.com. (Take screenshot.) Main Content h. Display the records from order where purch_amt is greater than 500. (Take screenshot.) i. Find all the details from order table and arrange the data according to dates in ascending order by using "ORDER BY". (Take screenshot.) j. Find the commission according to the city by using "GROUP BY". (Take screenshot.) k. Show all the names from the customers with name start from 'J'. (Take screenshot.) 1. Display all customer details from customer table where the grade is between 200 to 300 by using BETWEEN. (Take screenshot.) K m. Write a SQL statement that count all the orders for the date "2016-09- 10" using COUNT function. (Take screenshot.) n. Find the highest purchase amount order by each salesman with their customer_id and highest purchase amount by using MAX and GROUP BY clause in order table. (Take screenshot.) o. Display the minimum purchase amount from table order using MIN function. (Take screenshot.) p. Find the average commission from table salesman using AVG function. (Take screenshot.) q. Find the total purchase amount from order table using SUM function. (Take screenshot.) r. Find the highest purchase amount from Order table where customers have the highest purchase amount in the day more than 2000 using HAVING and MAX. (Take screenshot.) s. Rename database from "salesorderDB" to "salescustomerorderDB" using rename command. (Take screenshot.) t. Drop table order using DROP command. (Take screenshot.)
Expert Answer:
Answer rating: 100% (QA)
Solutions Step 1 a To CREATE a database name salesorderDB CREATE DATABASE salesorderDB Explanation We can create a database using CREATE DATABASE comm... View the full answer
Related Book For
Operating Systems Internals And Design Principles
ISBN: 9781292214290
9th Global Edition
Authors: Stallings William
Posted Date:
Students also viewed these programming questions
-
Nick Elodeon established HBO Link Data Encoder on May 20CY. The following transactions occurred during the month: May 1-Mr. Elodeon invested P250,000 into his business. 1-Rented office space and paid...
-
What is the standard deviation of an equally weighted portfolio of two stocks with a covariance of 0.009, if the standard deviation of the first stock is 15% and the standard deviation of the second...
-
A bank pays 5% with daily compounding on its savings accounts. Should it advertise the nominal or effective rate if it is seeking to attract new deposits?
-
How do you identify the potential classes in a problem domain description?
-
How many levels of taxation apply to corporate earnings paid out as nonqualified fringe benefits? Explain
-
Give two interpretations of the value of a bond from an options perspective.
-
Impact of a Premium Assume the same set of facts for Berol Corporation as in Exercise 10-16 except that it received $109,862 in return for the issuance of the bonds when the market rate was 8%....
-
What would efficient revenue management imply for the pricing of the Cowboys Stadium parking lot on typical game days? How about for the Super Bowl? How about for the many smaller events that fill...
-
! Required information [ The following information applies to the questions displayed below. ] The following trial balance was drawn from the records of Havel Company as of October 1 , year 2 . \...
-
read the case of Leave Division-OAS vs. Laraine Calingasan available at https://elibrary.judiciary.gov.ph/thebookshelf/showdocs/1/31039 Ponder on the propriety of the decision of the Supreme Court...
-
item price is rm305.00 rent fee is rm0.18 per year what is what are the percentage
-
Suppose you purchased a 3 0 0 0 par value, 5 year 1 0 % bond for 2 5 0 0 . Then you reinvest all coupon payments at a nominal rate of 6 % convertible monthly. Calculate his effective annual yield...
-
Which mortgage will require more interest payments over the life of the loan? Mortgage A: 15-year, $150,000, 4.2% interest . Mortgage B: 30-year, $150,000, 4.2% interest.
-
Describe the various types of employee benefits plans typically offered by small businesses. What issues do you find withdifferent types of plans? Describe what plans you would need in order to start...
-
How does epigenetic regulation influence cellular differentiation and development in multicellular organisms ? Explain
-
Outdoor, Inc. has 9,500 shares of $60 par common stock outstanding with a current market price of $116 per share. The board of directors declares a 6-for-1 stock split. A common shareholder who owned...
-
How has the globalization of firms affected the diversity of their employees? Why has increased diversity put an additional burden on accounting systems?
-
What characteristics are observed while going up the memory hierarchy?
-
What is the target application for TinyOS?
-
Briefly define shortest-process-next scheduling.
-
Find a Hamilton path from vertex \(s\) to vertex \(v\) for each graph in Figure 12.179 or indicate that there is none. W W Graph A Graph B V W Graph C Graph D Figure 12.179 Graphs A, B, C, and D
-
Use Figure 12.185 to determine if the given sequence of vertices is a Hamilton path, an Euler trail, both, or neither. 1. Graph \(A, e ightarrow b ightarrow a ightarrow e ightarrow d ightarrow c...
-
Suppose you have a complete weighted graph with vertices \(N, M, O\), and \(P\). 1. Use the formula \((n-1)\) ! to calculate the number of distinct Hamilton cycles in the graph. 2. Use the formula...
Study smarter with the SolutionInn App