nclude both SQL commands and SQL results in your answers: KimTay Pet Supplies is running a promotion that is valid for up to 20 days after an order is placed. List the invoice number, customer ID, customer first and last names, and the promotion date for each invoice. The promotion date is 20 days after the invoice was placed. Write PL/SQL (or MySQL) procedures to accomplish the following task: The procedure accepts the ID of a customer stored in the input variable named I_CUST_ID and displays the name (first name concatenated with last name) and credit limit of for this customer.

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter3: Designing A Page Layout: Creating A Website For A Chocolatier
Section3.3: Visual Overview: Layout With Positioning Styles
Problem 1QC
icon
Related questions
Question

Include both SQL commands and SQL results in your answers:

  1. KimTay Pet Supplies is running a promotion that is valid for up to 20 days after an order is placed. List the invoice number, customer ID, customer first and last names, and the promotion date for each invoice. The promotion date is 20 days after the invoice was placed.
  2. Write PL/SQL (or MySQL) procedures to accomplish the following task: The procedure accepts the ID of a customer stored in the input variable named I_CUST_ID and displays the name (first name concatenated with last name) and credit limit of for this customer.
CUSTOMER
CUST_FIRST_
ID
126 Joey
182
227
294
375
492
NAME
314 Tom
543
616
Billy
Sandra
435 James
05
10
15
20
Melanie
Samantha Smith
Elmer
Angie
Sally
721 Leslie
795 Randy
LAST_
NAME
Smith
Rufton
Pincher
Rascal
Jackson
Gonzalez
Jackson
Cruz
ADDRESS
17 Fourth St
21 Simple Cir
Smith
53 Verde Ln
22 Jackson
Farm Rd
Hendricks 27 Locklear In
14 Rock Ln
1 Rascal Farm
Rd
199 18th Ave
123 Sheepland
Rd
Blacksmith 75 Stream Rd
SALES REP
REP_ID FIRST NAME LAST NAME ADDRESS
Susan
Richard
Garcia
Miller
Smith
Jackson
Donna
Daniel
CITY
Cody
Garland
42 Blackwater
Way
16 Rockway Rd Wapiti
Powell
Ralston
Cody
Elk Butte
Garland
Powell
Ralston
Elk Butte
Cody
STATE POSTAL EMAIL
WY
WY
WY
WY
WY
WY
WY
WY
WY
WY
82414
82435
82440
82440
82414
82433
82450
82435
82440
82440
WY 82433
WY 82414
CITY
42 Mountain Ln Cody WY
87 Pikes Dr
Ralston WY
312 Oak Rd Powell WY
19 Lookout Dr
Elk Butte WY
jsmith 17@
example.com
billyruff@
example.com
spinch2@
example.com
ssmith5@
example.com
trascal3@
example.com
mjackson5@
example.com
jgonzo@
example.com
ejackson4@
example.com
BALANCE CREDIT_REP
LIMIT ID
$80.68
$500.00 05
Ismith12@
example.com
$43.13 $750.00 10
$156.38 $500.00 15
$58.60
$17.25 $250.00 15
$500.00 10
$252.25 $250.00 05
$230.40 $1,000.00 15
$45.20 $500.00 10
ahendricks7@ $315.00 $750.00 05
example.com
scruz5@
example.com
$8.33 $500.00 15
$166.65 $1,000.00 10
rblacksmith6@ $61.50
example.com
STATE POSTAL CELL PHONE
82414 307-824-1245
82440
82440
82433
307-406-4321
307-982-8401
307-883-9481
$500.00 05
COMMISSION RATE
$12,743.16 0.04
$20,872.11 0.06
$14,912.92 0.04
$0.00 0.04
Transcribed Image Text:CUSTOMER CUST_FIRST_ ID 126 Joey 182 227 294 375 492 NAME 314 Tom 543 616 Billy Sandra 435 James 05 10 15 20 Melanie Samantha Smith Elmer Angie Sally 721 Leslie 795 Randy LAST_ NAME Smith Rufton Pincher Rascal Jackson Gonzalez Jackson Cruz ADDRESS 17 Fourth St 21 Simple Cir Smith 53 Verde Ln 22 Jackson Farm Rd Hendricks 27 Locklear In 14 Rock Ln 1 Rascal Farm Rd 199 18th Ave 123 Sheepland Rd Blacksmith 75 Stream Rd SALES REP REP_ID FIRST NAME LAST NAME ADDRESS Susan Richard Garcia Miller Smith Jackson Donna Daniel CITY Cody Garland 42 Blackwater Way 16 Rockway Rd Wapiti Powell Ralston Cody Elk Butte Garland Powell Ralston Elk Butte Cody STATE POSTAL EMAIL WY WY WY WY WY WY WY WY WY WY 82414 82435 82440 82440 82414 82433 82450 82435 82440 82440 WY 82433 WY 82414 CITY 42 Mountain Ln Cody WY 87 Pikes Dr Ralston WY 312 Oak Rd Powell WY 19 Lookout Dr Elk Butte WY jsmith 17@ example.com billyruff@ example.com spinch2@ example.com ssmith5@ example.com trascal3@ example.com mjackson5@ example.com jgonzo@ example.com ejackson4@ example.com BALANCE CREDIT_REP LIMIT ID $80.68 $500.00 05 Ismith12@ example.com $43.13 $750.00 10 $156.38 $500.00 15 $58.60 $17.25 $250.00 15 $500.00 10 $252.25 $250.00 05 $230.40 $1,000.00 15 $45.20 $500.00 10 ahendricks7@ $315.00 $750.00 05 example.com scruz5@ example.com $8.33 $500.00 15 $166.65 $1,000.00 10 rblacksmith6@ $61.50 example.com STATE POSTAL CELL PHONE 82414 307-824-1245 82440 82440 82433 307-406-4321 307-982-8401 307-883-9481 $500.00 05 COMMISSION RATE $12,743.16 0.04 $20,872.11 0.06 $14,912.92 0.04 $0.00 0.04
ITEM
ITEM_ID
AD72
BC33
CA75
DT12
FM23
FS39
FS42
KH81
LD14
LP73
PF19
QB92
SP91
UF39
WB49
DESCRIPTION
Dog Feeding Station
Feathers Bird Cage (12x24x18)
Enclosed Cat Litter Station
Dog Toy Gift Set
Fly Mask with Ears
Folding Saddle Stand
Aquarium (55 Gallon)
Wild Bird Food (25 lb)
Locking Small Dog Door
Large Pet Carrier
Pump & Filter Kit
Quilted Stable Blanket
Small Pet Carrier
Underground Fence System
Insulated Water Bucket
FIGURE 1-2 Sample data for KimTay Pet Supplies
14216
14219
14222
14224
14228
14231
14233
14237
INVOICES
INVOICE_NUM INVOICE_DATE
ON HAND
12
10
15
27
CUST_ID
11/15/2021 125
11/15/2021 227
11/16/2021 294
182
11/16/2021
11/18/2021 435
11/18/2021 125
11/18/2021 435
11/19/2021 616
41
12
5
24
14
23
5
32
18
7
34
FIGURE 1-2 Sample data for
KimTay Pet Supplies (Continued)
CATEGORY
DOG
BRD
CAT
DOG
HOR
HOR
FSH
BRD
DOG
DOG
FSH
HOR
CAT
DOG
HOR
14216
14219
14219
14222
14224
14228
14228
14231
14233
14233
14233
14237
LOCATION
B
B
C
LD14
KH81
FS42
PF19
UF39
KH81
QB92
WB49
LP73
B
C
с
A
С
A
B
A
с
B
A
Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
itorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it
C
Introduction to Kim Tay Pet Supplies and StayWell Student Accommodation Databases
INVOICE_LINE
INVOICE_NUM ITEM_ID QUANTITY
CA75
AD72
DT12
PRICE
$79.99
$79.99
3
2
$39.99
$39.99
4
1
4
1
1
2
1
4
4
3
$24.95
$39.99
$124.99
$19.99
$49.99
$59.99
$74.99
$119.99
$39.99
$199.99
$79.99
QUOTED_PRICE
$37.99
$79.99
$39.99
$47.99
$18.99
$124.99
$74.99
$189.99
$19.99
$109.95
$74.95
$54.95
5
Transcribed Image Text:ITEM ITEM_ID AD72 BC33 CA75 DT12 FM23 FS39 FS42 KH81 LD14 LP73 PF19 QB92 SP91 UF39 WB49 DESCRIPTION Dog Feeding Station Feathers Bird Cage (12x24x18) Enclosed Cat Litter Station Dog Toy Gift Set Fly Mask with Ears Folding Saddle Stand Aquarium (55 Gallon) Wild Bird Food (25 lb) Locking Small Dog Door Large Pet Carrier Pump & Filter Kit Quilted Stable Blanket Small Pet Carrier Underground Fence System Insulated Water Bucket FIGURE 1-2 Sample data for KimTay Pet Supplies 14216 14219 14222 14224 14228 14231 14233 14237 INVOICES INVOICE_NUM INVOICE_DATE ON HAND 12 10 15 27 CUST_ID 11/15/2021 125 11/15/2021 227 11/16/2021 294 182 11/16/2021 11/18/2021 435 11/18/2021 125 11/18/2021 435 11/19/2021 616 41 12 5 24 14 23 5 32 18 7 34 FIGURE 1-2 Sample data for KimTay Pet Supplies (Continued) CATEGORY DOG BRD CAT DOG HOR HOR FSH BRD DOG DOG FSH HOR CAT DOG HOR 14216 14219 14219 14222 14224 14228 14228 14231 14233 14233 14233 14237 LOCATION B B C LD14 KH81 FS42 PF19 UF39 KH81 QB92 WB49 LP73 B C с A С A B A с B A Copyright 2021 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). itorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it C Introduction to Kim Tay Pet Supplies and StayWell Student Accommodation Databases INVOICE_LINE INVOICE_NUM ITEM_ID QUANTITY CA75 AD72 DT12 PRICE $79.99 $79.99 3 2 $39.99 $39.99 4 1 4 1 1 2 1 4 4 3 $24.95 $39.99 $124.99 $19.99 $49.99 $59.99 $74.99 $119.99 $39.99 $199.99 $79.99 QUOTED_PRICE $37.99 $79.99 $39.99 $47.99 $18.99 $124.99 $74.99 $189.99 $19.99 $109.95 $74.95 $54.95 5
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Multiple table
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
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning