Task 6: Find the ID, first name, and last name of each customer for which an invoice was not created on November 15, 2021. Task 13: List the invoice number and invoice date for each invoice created for the customer James Gonzalez. Task 15: List the invoice number and invoice date for each invoice that either was created for James Gonzalez or that contains an invoice line for Wild Bird Food (25lb).   TEMPLATE -- Task # 6 SELECT CUSTOMER.CUST_ID, FIRST_NAME, LAST_NAME FROM _____________, _________________ WHERE CUSTOMER.________________ = ______________.CUST_ID AND INVOICES.____________________ <> '2021-11-15'; -- Task # 13 SELECT INVOICE_NUM, INVOICE_DATE FROM ______________ WHERE ____________ IN (SELECT CUST_ID FROM CUSTOMER WHERE _____________ = _______________ AND ____________ = ______________); -- Task # 15 SELECT DISTINCT INVOICES.INVOICE_NUM, INVOICES.INVOICE_DATE FROM INVOICES, INVOICE_LINE, ITEM, CUSTOMER WHERE INVOICES.INVOICE_NUM = INVOICE_LINE.INVOICE_NUM AND INVOICE_LINE.ITEM_ID = ITEM.ITEM_ID AND INVOICES.CUST_ID = CUSTOMER.CUST_ID AND (ITEM._______________ = 'Wild Bird Food (25 lb)' _____ (CUSTOMER.______________________ = 'James' AND CUSTOMER.___________ = 'Gonzalez'));

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Task 6: Find the ID, first name, and last name of each customer for which an invoice was not created on November 15, 2021.

Task 13: List the invoice number and invoice date for each invoice created for the customer James Gonzalez.

Task 15: List the invoice number and invoice date for each invoice that either was created for James Gonzalez or that contains an invoice line for Wild Bird Food (25lb).

 

TEMPLATE

-- Task # 6
SELECT CUSTOMER.CUST_ID, FIRST_NAME, LAST_NAME
FROM _____________, _________________
WHERE CUSTOMER.________________ = ______________.CUST_ID
AND INVOICES.____________________ <> '2021-11-15';

-- Task # 13
SELECT INVOICE_NUM, INVOICE_DATE
FROM ______________
WHERE ____________ IN (SELECT CUST_ID
FROM CUSTOMER
WHERE _____________ = _______________
AND ____________ = ______________);

-- Task # 15
SELECT DISTINCT INVOICES.INVOICE_NUM, INVOICES.INVOICE_DATE
FROM INVOICES, INVOICE_LINE, ITEM, CUSTOMER
WHERE INVOICES.INVOICE_NUM = INVOICE_LINE.INVOICE_NUM
AND INVOICE_LINE.ITEM_ID = ITEM.ITEM_ID
AND INVOICES.CUST_ID = CUSTOMER.CUST_ID
AND (ITEM._______________ = 'Wild Bird Food (25 lb)' _____ (CUSTOMER.______________________ = 'James' AND CUSTOMER.___________ = 'Gonzalez'));

 

CUST ID
FIRST NAME
LAST_NAME
ADDRESS
CITY
STATE
POSTAL
EMAIL
BALANCE
CREDIT_LIMIT
REP_ID
125
Joey
Smith
17 Fourth St
Cody
WY
82414
jsmith17@example.com
80.68
500.00
05
182
Billy
Rufton
21 Simple Cir
Garland
WY
82435
billyruff@example.com
43.13
750.00
10
227
Sandra
Pincher
53 Verde Ln
Powell
WY
82440
spinch2@example.com
156.38
500.00
15
294
Samantha
Smith
14 Rock Ln
Ralston
WY
82440
ssmith5@example.com
58.60
500.00
10
314
Tom
Rascal
1 Rascal Farm Rd
Cody
WY
82414
trascal3@example.com
17.25
250.00
15
375
Melanie
Jackson
42 Blackwater Way
Elk Butte
WY
82433
mjackson5@example.com
252.25
250.00
05
435
James
Gonzalez
16 Rockway Rd
Wapiti
WY
82450
jgonzo@example.com
230,40
1000.00
15
492
Elmer
Jackson
22 Jackson Farm Rd
Garland
WY
82435
ejackson4@example.com
45.20
500.00
10
543
Angie
Hendricks
27 Locklear Ln
Powell
WY
82440
ahendricks7@example.com
315.00
750.00
05
616
Sally
Cruz
199 18th Ave
Ralston
WY
82440
scruz5@example.com
8.33
500.00
15
721
Leslie
Smith
123 Sheepland Rd
Elk Butte
WY
82433
Ismith12@example.com
166.65
1000.00
10
795
Randy
Blacksmith
75 Stream Rd
Cody
WY
82414
rblacksmith6@example.com
61.50
500.00
05
Transcribed Image Text:CUST ID FIRST NAME LAST_NAME ADDRESS CITY STATE POSTAL EMAIL BALANCE CREDIT_LIMIT REP_ID 125 Joey Smith 17 Fourth St Cody WY 82414 jsmith17@example.com 80.68 500.00 05 182 Billy Rufton 21 Simple Cir Garland WY 82435 billyruff@example.com 43.13 750.00 10 227 Sandra Pincher 53 Verde Ln Powell WY 82440 spinch2@example.com 156.38 500.00 15 294 Samantha Smith 14 Rock Ln Ralston WY 82440 ssmith5@example.com 58.60 500.00 10 314 Tom Rascal 1 Rascal Farm Rd Cody WY 82414 trascal3@example.com 17.25 250.00 15 375 Melanie Jackson 42 Blackwater Way Elk Butte WY 82433 mjackson5@example.com 252.25 250.00 05 435 James Gonzalez 16 Rockway Rd Wapiti WY 82450 jgonzo@example.com 230,40 1000.00 15 492 Elmer Jackson 22 Jackson Farm Rd Garland WY 82435 ejackson4@example.com 45.20 500.00 10 543 Angie Hendricks 27 Locklear Ln Powell WY 82440 ahendricks7@example.com 315.00 750.00 05 616 Sally Cruz 199 18th Ave Ralston WY 82440 scruz5@example.com 8.33 500.00 15 721 Leslie Smith 123 Sheepland Rd Elk Butte WY 82433 Ismith12@example.com 166.65 1000.00 10 795 Randy Blacksmith 75 Stream Rd Cody WY 82414 rblacksmith6@example.com 61.50 500.00 05
INVOICE_NUM
INVOICE_DATE
CUST_ID
14216
2021-11-15
125
14219
2021-11-15
227
14222
2021-11-16
294
14224
2021-11-16
182
14228
2021-11-18
435
14231
2021-11-18
125
14233
2021-11-18
435
14237
2021-11-19
616
Transcribed Image Text:INVOICE_NUM INVOICE_DATE CUST_ID 14216 2021-11-15 125 14219 2021-11-15 227 14222 2021-11-16 294 14224 2021-11-16 182 14228 2021-11-18 435 14231 2021-11-18 125 14233 2021-11-18 435 14237 2021-11-19 616
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
SQL Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education