Question: Using the above tables write an sql statement for the following: For each order in the database, list account ID, order number, order date, book

Using the above tables write an sql statement for the following:
For each order in the database, list account ID, order number, order date, book ID, quantity sold, unit sales price, subtotal of book sales, payment card number, and card type. Sort the result by account ID, order number and book ID in ascending order.
SalesOrder Quantity CustomerAccount Accounti 1001 1002 1003 1004 1005 1006 Email Tom.Caruthers @elsewhere.com Brenda.Catnazaro @somewhere.com Arthur.Connel@gmail.com Jessica.Frances@hotmail.com Mikayla.Justice@yahoo.com John. Wright@outlook.com FirstName Tom Brenda Arthur Jessica Mikayla John LastName Caruthers Catnazaro Connel Frances Justice Wright OrderNum 4001 4002 4003 4004 4005 4006 4007 4008 OrderDate Mar 5 2020 Nov 1 2019 Mar 5 2020 Apr 7 2019 Jan 6 2018 July 16 2019 June 8 2018 Nov 10 2019 Oct 3 2018 Sept 19 2019 BookSales CardID 2001 2002 2003 2003 2004 2004 2009 2009 2001 2002 4009 4010 Expiration Month Payment Method CardID 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 Card Number 5466101022023033 3715110121113701 4556695794379435 4532311557097516 5191550572725473 6011790023613342 373801253658413 5523961306341173 4929797196205852 6011297350808859 344780054874856 4113601974804222 4506264784604830 4079585420563601 4561416604111360 Card Type MasterCard AmExpress Visa Visa MasterCard Discover AM Express MasterCard Visa Discover AmExpress 2 BookSalesID 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 | Expiration Year 2020 2023 2020 2024 2025 2023 2023 2021 2022 2022 2025 2023 2023 2024 2023 UnitSales Price $10.88 $24.27 $10.88 $10.19 $13.29 $15.89 $16.70 $10.99 $19.50 $20.99 $30.50 $20.88 $30.66 $20.26 $10.75 $9.88 $8.99 $19.50 $10.66 $15.99 AccoutID 1001 1001 1002 1002 1003 1003 1004 1004 1005 1006 1006 1001 1002 1003 1004 OrderNum BookID 4001 3001 4001 3002 4002 3001 4002 3004 4002 3003 4003 3001 4003 3010 4004 3010 4004 3004 4005 3005 4005 3004 4006 3010 4006 3005 4007 3006 4008 3004 4009 3002 4009 3004 4009 3006 4010 3003 40103002! PROPO Visa Visa Visa Visa Book BookID 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 Book Title The Tipping Point: How Little Things Can Make a Big Difference The Miracle of Freedom: 7 Tipping Points that Saved the World Tipping Point: Arctic Terrorism Thriller Freakonomics: A Rogue Economist Explores the Hidden Side of Everything Girl, Woman, Other All Light We Cannot See The Giver of Stars The Overstory Godshot Valentine NumOfPages Language 322 English 304 English 503 English 315 English 464 English 544 English 400 English 512 English 336 English 320 English ISBN10Num 0316346624 1629720070 1549539523 0060731338 0802156983 1501173219 0399562486 0393635521 1948226480 0062913263 UnitPrice $17.00 $26.97 $13.99 $16.99 $13.49 $10.05 $14.02 $18.99 $26.00 $18.88 DiscountRate 0.36 0.10 0.05 0.40 0.30 0.25 0.20 0.15 0.10 0.25 QtylnStock 600 200 250 700 500 350 200 470 800 700Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
