Homework H3 – with Solution Dynasets

1.       Which books have been published in paperback? List author last name and book title. Sort by last name.

2.      Find the average price of each type of book. Format price as currency.

3.      For each branch store, list the number of books on hand.

4.      List all fiction (FIC) books published in New York. Just show the book title and publisher name.

5.      Find the average price of all books for which there are more than 2 on hand in inventory.

6.      The president of Henry Books would like to know the average price of books at each of the four branches. But she wants the prices
broken down by type.  And she only wants the prices for fiction (
FIC), horror (HOR), mystery (MYS), and science fiction (SFI).
Format your results using currency.

7.      (challenging) List all publishers that do not have any books at the Henry Brentwood branch.

8.      (more challenging) Which author has the most number of books on hand in inventory?  List author last name and number of books on hand.

Q1,  N = 23

Paperbacks-Q1

AuthorLast

Title

Ambrose

Band of Brothers

Camus

The Stranger

Camus

The Fall

Chase

When Rabbit Howls

Francis

Slay Ride

Francis

The Edge

Heller

Catch-22

Hofstadter

Godel, Escher, Bach

Kidder

The Soul of a New Machine

Morrison

Song of Solomon

Morrison

Beloved

Morrison

Jazz

Pratt

A Guide to SQL

Salinger

Nine Stories

Salinger

The Catcher in the Rye

Salinger

Franny and Zooey

Solotaroff

Group: Six People in Search of a Life

Steinbeck

East of Eden

Steinbeck

Travels with Charley

Steinbeck

Of Mice and Men

Steinbeck

The Grapes of Wrath

Straub

Magic Terror

Vintage

A Deepness in the Sky

Q2,  N = 12

AvgPriceType-Q2

Type

Average Price

ART

$23.32

CMP

$37.95

FIC

$10.52

HIS

$9.60

HOR

$15.47

MYS

$12.98

PHI

$14.00

POE

$14.00

PSY

$8.35

SCI

$11.16

SFI

$13.10

TRA

$7.95

Q3,  N = 4

BranchOnHand-Q3

BranchName

Books On Hand

Henry Brentwood

29

Henry Downtown

22

Henry Eastshore

17

Henry On The Hill

31

Q4,  N = 13

NewYork-Q4

Title

PublisherName

To Kill a Mockingbird

HarperCollins Publishers

Nine Stories

Lb Books

Franny and Zooey

Lb Books

The Catcher in the Rye

Lb Books

Of Mice and Men

Penguin USA

East of Eden

Penguin USA

The Grapes of Wrath

Penguin USA

Beloved

Plume

Jazz

Plume

Song of Solomon

Plume

Catch-22

Scribner

The Stranger

Vintage Books

The Fall

Vintage Books

Q5,  N = 1

AvgPrice-Q5

Avg Book Price

13.33

Q6,  N = 4

TypexBranch-Q6

Type

Henry Brentwood

Henry Downtown

Henry Eastshore

Henry On The Hill

FIC

$11.97

$13.00

$11.25

$9.11

HOR

$19.60

$18.81

 

$13.80

MYS

$15.97

 

$24.95

$15.97

SFI

$13.96

$10.58

$16.06

 

Q7,  N = 19

NotHenryBrentwood-Q7

PublisherName

Arkham House

Arcade Publishing

Berkley Publishing

Course Technology

Fawcett Books

Farrar Straus & Giroux

HarperCollins Publishers

Jeremy P. Tarcher

Lb Books

McPherson and Co.

Random House

Schoken Books

Taunton Press

Tor Books

Thames and Hudson

Touchstone Books

Vintage Books

W.W. Norton

Westview Press

Q8,  N = 1

MaxOnHand-Q8

MaxOnHand

AuthorLast

17

Morrison