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?
-
Suppose that A, B, and C are simultaneously transmitting 0 bits, using a CDMA system with the chip sequences of Fig. 2-45(b). What is the resulting chip sequence?
-
How many positive integers between 50 and 100 a) Are divisible by 7? Which integers are these? b) Are divisible by 11? Which integers are these? c) Are divisible by both 7 and 11? Which integers are...
-
The [+45/-45] laminate described in Problem 7.6 is subjected to a uniaxial force per unit length \(N_{x}=30 \mathrm{MPa} \mathrm{mm}\). Find the resulting stresses and strains in each ply along the...
-
S. Noble and T. Wells share income on a 6 : 4 basis. They have capital balances of $100,000 and $70,000, respectively, when W. Trinity is admitted to the partnership. Instructions Prepare the journal...
-
Write a javascript program to display the grade of a student 1) Text 1-Student Name 2) Text 2-Student Id 3) Text 3 - Mark 4) Button - When you click the button display the grade in Paragraph (apply...
-
John Fuji (birthdate June 6, 1981) moved from California to Washington in December 2018. His earnings and income tax withholding for 2019 for his job as a manager at a Washington apple-processing...
-
With a lot of different data (like salesforce, student information system, and advertising spend), what would you do? Would you use salesforce reports and only report front end or et IT develop an...
-
The following accounts are excerpts from Your Co's 12/31/10 adjusted trial balance. A/P 20 A/R 30 Cash 50 Dividends 10 Fuel Expense 10 Prepaid Rent 15 Rent Expense 30 Retained Earnings 60 Service...
-
DEFINE THE FOLLOWING KEY TERMS 1. CIT ( CRISIS INTERVENTION TEAMS ) 2. POLICING GOALS 3. MISSION STATEMENT 4. VALUES 5. POLICY 6. INTERIM ORDER 7. ORGANIZATIONAL CHART 8. HIERARCHY 9. GENERALIST 10....
-
When payments are made at the beginning of a lease period in a finance lease, the lessee Multiple choice question. reduces the lease obligation for the full amount of the first payment. computes...
-
Identifying the beneficial owner of all assets, tracing the transmission of assets and reporting suspicious transactions are all goals of: Select one: a. anti-embezzlement measures b. anti-fraud...
-
Consider the following transaction: A company sold merchandise costing $9,000 for $20,000. Of the $20,000, $7,500 was received in cash and the remainder was on account. Which ONE of the following is...
-
Perform a SWOT Analysis Directions: Complete a SWOT Analysis (outline on following page) for your chosen company. To determine strengths and weaknesses, examine your company's website and other...
-
Explain the term "Equivalent Units". Why are they calculated in process costing? [4 Marks] [minimum 350 words]
-
What characteristics are observed while going up the memory hierarchy?
-
What is the target application for TinyOS?
-
Briefly define shortest-process-next scheduling.
-
This exercise considers data from the Medical Expenditure Panel Survey (MEPS) described in Exercise 1.1 and Section 11.4. Our dependent variable consists of the number of outpatient (COUNTOP) visits....
-
This exercise considers the data described in the Section 13.2.2 ratemaking classification example using data in Table 13.3 Table 13.3 . a. Fit a gamma regression model using a log-link function with...
-
Verify that the Tweedie distribution is a member of the linear exponential family of distributions by checking equation (13.9). In particular, provide an expression for \(S(y, \phi)\) (note that...
Study smarter with the SolutionInn App