Write a query to retrieve all products that had been ordered by customer id = 2....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a query to retrieve all products that had been ordered by customer id = 2. The SQL query should show order id, order date (from Orders table), product ID, and product name (from Products table). Sort the results by orderdate with ascending order so that the older appear first. The query output should be like the following table. Save your query as "Qry10" in PracticeDatabase.accdb. orderid 353 353 353 353 353 353 353 538 538 609 orderdate. productid 5/11/2014 5/11/2014 5/11/2014 5/11/2014 5/11/2014 5/11/2014 5/11/2014 6/21/2014 6/21/2014 5/9/2016 productname 1 Almonds, Hickory Smoked - 12 oz. Bag 2 Almonds, Roasted and Salted - 18 oz. Bag 11 Cappuccino Almonds in 8oz. Bag 20 Chunky Pretzels 27 Corn Chips Bag 31 Chocolate Chunk Cookies, 9.5 oz. 51 Coconut Chocolate Chip Cookies 5 California Original Pistachios - 1 lb. Bag 68 Mushroom Rolls 9 Dried Cranberries - 34 oz. Write a query to retrieve all products that had been ordered by customer id = 2. The SQL query should show order id, order date (from Orders table), product ID, and product name (from Products table). Sort the results by orderdate with ascending order so that the older appear first. The query output should be like the following table. Save your query as "Qry10" in PracticeDatabase.accdb. orderid 353 353 353 353 353 353 353 538 538 609 orderdate. productid 5/11/2014 5/11/2014 5/11/2014 5/11/2014 5/11/2014 5/11/2014 5/11/2014 6/21/2014 6/21/2014 5/9/2016 productname 1 Almonds, Hickory Smoked - 12 oz. Bag 2 Almonds, Roasted and Salted - 18 oz. Bag 11 Cappuccino Almonds in 8oz. Bag 20 Chunky Pretzels 27 Corn Chips Bag 31 Chocolate Chunk Cookies, 9.5 oz. 51 Coconut Chocolate Chip Cookies 5 California Original Pistachios - 1 lb. Bag 68 Mushroom Rolls 9 Dried Cranberries - 34 oz.
Expert Answer:
Related Book For
Using Microsoft Excel and Access 2016 for Accounting
ISBN: 978-1337109048
5th edition
Authors: Glenn Owen
Posted Date:
Students also viewed these databases questions
-
Osborn Manufacturing uses a predetermined overhead rate of $19.70 per direct labor-hour. This predetermined rate was based on a cost formula that estimates $265,950 of total manufacturing overhead...
-
Create a query to retrieve the customerID, orderid, order date, shipping cost and shipping date of orders if the shipping date is between April 3, 2014 and July 5, 2015 and shipping cost is greater...
-
Rodriguez Company pays $358,020 for real estate with land, land improvements, and a building. Land is appraised at $220,500; land improvements are appraised at $73,500; and the building is appraised...
-
Perhaps more surprising to Mr. Pitkin was a proposal by the VP of Marketing to make a major investment in market share by increasing promotional expenditures by $2.5 million during 1998-2000. Sales...
-
In the current year, DYL Corporation earned taxable and tax-exempt interest from the following investments. Investment ___________________________________ Interest Income 10-year municipal bond...
-
Write the balanced equation for the preparation of iron(III) oxide from iron metal and oxygen gas.What type of reaction is this?
-
Why do you think that the increase in the number of working parents has contributed to a higher demand for food services?
-
Empire Company is a manufacturer of smart phones. Its controller resigned in October 2017. An inexperienced assistant accountant has prepared the following income statement for the month of October...
-
Calculate ending inventory, cost of goods sold, gross profit under each of the following methods. (1) LIFO. (2) FIFO. (3) Average-cost. (Round per unit cost to 3 decimal places, e.g. 15.647 and final...
-
Prepare a corpo The first step was for the two owners to form an LLC. The new company initially authorized 500,000 shares at a $1.00 par value per share. 1) In recognition of their development of the...
-
How has the monetary policy of the Bank of Canada evolved in a post-covid Canadian economy? Give specific examples.
-
The United States can be thought of as a non-trivial currency union since, although it is a single country, it encompasses many states that have economies comparable in size to those of some European...
-
An investor is considering the purchase of an option-free corporate bond with a coupon rate of 6.625% and 20 years remaining to maturity. The bonds price is 102.833 and the yield to maturity is...
-
Which set of conditions will result in a bond whose price has greatest sensitivity to changes in interest rates? Explain your choice. a. A low coupon and a short maturity. b. A high coupon and a long...
-
Consider a 6% coupon 20-year option-free bond selling at 89.32. If the yield is decreased by 20 basis points from 7.0% to 6.8%, the price would increase to 91.32. If the yield increases by 20 basis...
-
Some EU politicians have accused the UK of wanting its cake and eating it. In the context of the referendum vote to leave the EU and the subsequent negotiations on withdrawal, how far would you agree...
-
Plz help me with these questions: Dont use any AI tools and proper explanations. These are normal questions on research papers: What are the different research paradigms/philosophies. When are they...
-
d. The characteristic equation of a control system is given by s+2s+8s+12s+20s+16+16=0. Determine the number of the roots of the equation which lie on the imaginary axis of s-plane
-
What is the Page Layout view?
-
Which ratios are usually formatted as numbers?
-
Why is the point-and-click method of cell referencing easier than typing references directly into worksheet cells?
-
For the following sets of functions: (i) show that each is orthogonal on the given interval, and (ii) determine the corresponding orthonormal set. a. \(\{\sin 2 n x\}, \quad n=1,2,3, \ldots, \quad 0...
-
Consider the square wave function \[f(x)=\left\{\begin{array}{rc} 1, & 0
-
Consider \(f(x)=4 \sin ^{3} 2 x\). a. Derive the trigonometric identity giving \(\sin ^{3} \theta\) in terms of \(\sin \theta\) and \(\sin 3 \theta\) using DeMoivre's Formula. b. Find the Fourier...
Study smarter with the SolutionInn App