Generate a listing of all purchases made by the customers, using the output shown below as your guide. Sort the results by customer code, invoice number, and product description.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Generate a listing of all purchases made by the customers, using the output shown below as your guide. Sort the results by customer code, invoice number, and product description.
![CUS_CODE INY_NUMBER INV_DATE
P_DESCRIPT
LNE_UNITS LINE_PRICE
1 0011
1002
16-Jan-18 Rat-tall fle, 118-n. tine
2
4.99
1 0011
1004
17-Jan-18 Claw hammer
2
995
1 0011
1004 17-Jan-18 Rat-tail fle, 18-in. time
3
4.99
1 0011
1003 17-Jan-10 Clow hamnor
1
9.95
1 0011
1003
17-Jan-10 PVC pipe, 3.5-n., 6-ft
5.07
1 0011
1003 17-Jan-18 Steel mattng,4x8x1/6", 5" mesh
3
119.95
10012
1003 16-Jan-18 7.25-in pwr. saw blade
14.99
10012
1003
16-Jan-18 B8D cardless drill, 12-in.
1
38.95
10012
1003 16-Jan-18 Hrd.cloth, 1/4-in., 2x50
1
39.95
1 0014
1001 16-Jan-18 7.25-in. pwr. savr blade
1
14.99
10014
1001 16-Jan-18 Claw hammer
1
9.95
1005 17-Jan-18 1.25-in metal screw, 25
1005 17-Jan-18 BSD jigsaw, 12-in. blade
1009 17-Jan-10 Claw hammer
10014
6.99
10014
1
109.92
1 0014
9.95
1 0014
1008 17-Jan-18 Hicut chain saw, 16 in.
1007 17-Jan-187.25-n. pwr. saw blade
1007 17-Jan-18 Rat-tail fle, 18-in. tine
1005 17-Jan-18 PVC pipe, 3.5-n., 8-ft
1
256.99
10015
2
14.99
1 0015
1
4.99
1 0018
12
5.87](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F99658b98-0700-47e2-8307-967221400ab4%2Fb911754e-0ecb-4869-af32-3902d1cad583%2Ff31j91m_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)