6- Create a query to produce the total purchase per invoice, generating the results shown below, sorted by invoice number. The invoice total is the sum of the product purchases in the LINE that corresponds to the INVOICE. INV NUMBER Invoice Total 1001 24.94 1002 9.98 1003 153.85 34.87 1004 1005 70.44 1006 397.83 1007 34.97 1008 399. 15 7- Write a query to produce the number of invoices and the total purchase amounts by customer, using the output shown in Figure below as your guide. The results are sorted by customer code. CUS CODE Number of lovoices | Total Customer Purchases 444 00 153 85 422 77 34 97 10011 10012 10014 10015 10018 70 44
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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps