
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
A.Write a query to extract only the zipcode from customers address

Transcribed Image Text:tables.pdf
3 / 5
75%
+
must reflect the payment statusfor each booking, including deposit, when the deposit was made,
then each of the payments made, and when the entirepayment was completed.
Customer
CustID
CustomerName Address
1| Lorry Kovacs
2 Bonnie Artest
3 Bob O'Connor
4 Harry Salomon
Mary Combs
Cary Jones
Mary Tyler
Johny Milano
Phone
(603)536-0987
(603)819-0387
(802)918-7565
(603)536-7565
(603)536-3632
(603)536-8739
(603)669-7431 03/16/1969
BirthDate
13 High Street, Plymouth, NH 03264
45 Maple Drive, Concord, NH 03301
17 10th Street, Brattleboro, VT 05301
67 Boggs Road, Campton, NH 03223
48 Main Street, Campton, NH 03223
03/16/1972
07/08/1977
01/05/1966
07/13/1965
5
02/17/1967
12/03/1966
8
9 Bobby Lamson
10 Henry Lawson
47 Broad Avenue, Plymouth, NH 03264
71 Main Street, Concord, NH 03301
983 Mountain Road, Campton, NH 03223
421 Elm Street,Manchester, NH 03308
| 92 Main Street, Brattleboro, VT 05301
10/16/1974
06/14/1973
09/17/1961
(603)536-4733
(603)347-5592
(802)218-7318
Vehicle
Capacity Deposit Rate
$100.00
$25.00 $100.00
$50.00
$50.00
$45.00
%$470.00
VehID
Limit
6
6
24
3
Make
1 Ford F350
2 GMC Silverado
3 Honda Civic
4 Chevrolet Malibu
Ford Taurus
Туре
Truck
Truck
Sedan
Sedan White
Sedan Maroon
Color
Blue
$25.00
White
Green
3
$15.00
$15.00
5
24
$20.00
24
Honda Odissey
Ford Explorer
8 Nissan Sentra
Toyota Camry
10 | Subaru Forester
Van
Beige
6
$15.00
24
SUV
Green
6
$10.00
$60.00
24
Sedan
Silver
5
$15.00
$45.00
24
9
Sedan Black
$25.00
$50.00
$55.00
$75.00
5
24
SUV
White
5
24
Booking
BookID CustID VehID DateTimeRented
Payment
PmtID BookID
DateTimeReturned
PmtDate
PmtAmt
3 07/18/2005
6 07/04/2005
8 07/08/2005
1 07/15/2006
2 07/15/2006
3 07/19/2006
07/07/2006
5 07/13/2006
6 07/07/2006
7 06/26/2006
8 07/10/2006
9 07/18/2006
10 07/14/2006
11 07/26/2006
12 07/25/2006
$30.00
$40.00
1
07/23/2006 10:00 PM
07/22/2006 05:00 PM
1
10
07/22/2005 07:00 PM
2
07/21/2005 01:00 PM
07/21/2005 06:00 PM
07/12/2005 10:00 AM
07/17/2005 04:00 PM
07/10/2006 08:00 PM
2
1
07/22/2006 10:00 AM
3.
$25.00
4
4
4
07/13/2006 09:00 AM
4
$50.00
$100.00
$70.00
5
07/18/2006 03:00 PM
5
07/11/2006 10:00 AM
07/02/2006 11:00 AM
7
4
$15.00
2
07/01/2005 05:00 PM
$15.00
$75.00
8
9
07/11/2006 04:00 PM
07/12/2006 10:00 PM
9
9
07/23/2005 07:00 PM
07/24/2006 06:00 PM
10
$45.00
10
4
07/20/2006 05:00 PM
07/21/2006 04:00 PM
$55.00
$50.00
11
11
6
07/31/2006 08:00 PM
08/01/2006 06:00 PM
12
07/30/2005 01:00 PMI
07/18/2005 08:00 PM
12
07/30/2006 05:00 PM
13
14
$60.00
13
07/19/2006 02:00 PM
$70.00
$100.00
14
07/16/2005 06:00 PM
07/17/2006 03:00 PM
15
15
9
07/25/2005 01:00 PM
07/26/2006 11:00 AM
11:00 AM
2 Type here to search
67°F
5/5/2022
2
***) ^.
...
II
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
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
- You have been told that you need to store the zip code for employees. Add a column to the EMPLOYEE table which will be used to store each employee’s zip code Update two rows in the EMPLOYEE table and assign a zip code (must have a WHERE clause). (you MAY use 1 or 2 statements) Write a query that includes each employee's last name, department name (not ID), and salary for each employee whose salary is less than the average for their departmentarrow_forward3. Run a query that gives the average grade on the final exam for male students and for femalestudents. Round that number to 1 decimal place only.arrow_forwardThe following database will be used in this question: SALESREP SalesRepNo 654 734 345 434 RepName Jones Smith Chen Johnson HireDate 01/02/2005 02/03/2007 01/25/2004 11/23/2004 CUSTOMER CustNo 9870 8590 7840 4870 CustName Winston Gonzales Harris Miles Balance 500 350 SalesRepNo 345 434 654 345 800 100arrow_forward
- Insert into table customerPayment, columns customerOrderld and total result set returned from query a. Select columns id and total from table customerOrder where column orderStateld is equal to subquery i. (select column id from table orderState where column state is equal to "Payment received") Write Test Case 1 as a SQL join query to do the following a. Select using concatenation of columns firstName and lastName from table www customer as Customer b. Select customerOrderId from table customerPayment as "Customer Order" c. Select description from table product as Product d. Select total from table customerOrder as “Product Total" e. Join tables customerPavment, customerOrder, customer, product f. Order by column lastName from table customer Alter table purchaseOrder add column total as data type decimal size 7,2, not null, default value of 0.0arrow_forwardb. Write a query to get the average salary and the total number of employees who work in the History department (in that order). c. Write a query to get the number of employees working in the History department with a job title of Head of Department.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education