Use SQL commands to finish the questions. Please show BOTH SQL commands and results in your answers. List the item ID and description for all items. The descriptions should appear in uppercase letters. List the customer ID and first and last names for all customers located in the city of Cody. Your query should ignore case. For example, a customer with the city Cody should be included, as should customers whose city is CODY, cody, cOdY, and so on. (Hint: use UPPER or LOWER) List the customer ID, first and last names, and balance for all customers. The balance should be rounded to the nearest dollar.

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

Use SQL commands to finish the questions. Please show BOTH SQL commands and results in your answers.

  1. List the item ID and description for all items. The descriptions should appear in uppercase letters.
  2. List the customer ID and first and last names for all customers located in the city of Cody. Your query should ignore case. For example, a customer with the city Cody should be included, as should customers whose city is CODY, cody, cOdY, and so on. (Hint: use UPPER or LOWER)
  3. List the customer ID, first and last names, and balance for all customers. The balance should be rounded to the nearest dollar.
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
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
Expert Solution
steps

Step by step

Solved in 4 steps

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
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