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 4TD
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;

Blurred answer
Students have asked these similar questions
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
Select Invoice_number, invoice_due_date, payment_date and the number of days late for those invoices that were paid after the due date. (give this a meaningful name using AS) Then using that WHERE clause, when clients paid late, find the average number of days they were late.
List the order number and order date for every order that was placed by Mary Nelson and that             contains an order line for an iron. Use an INTERSECT operator.   table name is:ORDER_LINEORLN_ORDER_NUMBER    ORLN_PART_NUMBER ORLN_NUMBER_ORDERED    ORLN_QUOTED_PRICE   tablename is ORDER_TABLE ORDR_ORDER_NUMBER    ORDR_ORDER_DATE            ORDR_CUSTOMER_NUMBER tablename is CUSTOMER CUST_NUMBERCUST_LAST    CUST_FIRST    CUST_STREET    CUST_CITY    CUST_STATE    CUST_ZIP_CODE    CUST_BALANCE    CUST_CREDIT_LIMIT    CUST_SALES_REP_NUM tablename is PART PART_NUMBER    PART_DESCRIPTION    UNITS_ON_HAND    ITEM_CLASS    WAREHOUSE    UNIT_PRICE tablename is SALES_REP SLSR_PKSLSR_LAST    SLSR_FIRST    SLSR_STREET    SLSR_CITY    SLSR_STATE    SLSR_ZIP_CODE    SLSR_TOTAL_COMMISSION    SLSR_COMMISSION_RATE   SELECT ORDR_ORDER_NUMBER, ORDR_ORDER_DATEFROM ORDER_TABLEWHERE ORDR_ORDER_NUMBER IN (SELECT ORLN_ORDER_NUMBERFROM ORDER_LINEWHERE ORLN_PART_NUMBER IN (SELECT PART_NUMBERFROM PARTWHERE…
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
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage