A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 8, Problem 3SCG
Program Plan Intro

SELECT statement:

It is used to retrieve information from the table or database. The syntax for the “SELECT” statement is given below:

Syntax:

SELECT * FROM table_Name;

“Round ()” function:

The function used to round a number that specified in decimal places. The format of the “Round ()” function is as follows:

Syntax:

ROUND (number, decimal_places)

Blurred answer
Students have asked these similar questions
Display only the products (name and ID) that have a quantity greater than the average quantity of all products PLEASE
Please answer the last 3 items thanks
SELECT COUNT(INV_NUMBER) AS 'Total Invoices', SUM(TOTAL_PRICE) AS 'Total Sales', MIN(TOTAL_PRICE) AS 'Minimum Customer Purchases', MAX(TOTAL_PRICE) AS 'Largest Customer Purchases', ROUND(AVG(TOTAL_PRICE), 2) AS 'Average Customer Purchases'FROM (SELECT CUS_CODE, LINE.INV_NUMBER AS INV_NUMBER, ROUND(SUM(LINE.LINE_PRICE * LINE.LINE_UNITS), 2) AS TOTAL_PRICEFROM INVOICE, LINE WHERE INVOICE.INV_NUMBER = LINE.INV_NUMBER GROUP BY CUS_CODE, LINE.INV_NUMBERORDER BY CUS_CODE, LINE.INV_NUMBER)INVOICELINE;     i use this code but it didn't show the same value as in the question
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage