ISM6217 David Norman SQL Homework

Embed Size (px)

Citation preview

  • 8/11/2019 ISM6217 David Norman SQL Homework

    1/16

    ISM6217 SQL Homework Sprin

  • 8/11/2019 ISM6217 David Norman SQL Homework

    2/16

    ISM6217 SQL Homework Spring 2005

    Instructions: Use the pubsdatabase in SQL Server to write queries to solve the following problems.

    1. What is the average quantity of sales to stores with the IDs 6380 or 7896?

    2. List the title ID and total (sum) sales quantity for all titles that have a total sales quantity of 20 or less. Put the list inorder of total sales quantity.

    3. List the store ID and total (sum) sales quantity for stores that meet both of the following criteria: store ID of 6380,7896, or 8042, and have a total sales quantity of greater than 20. Use the column name alias "Total Sales' for the total

    sales quantity column. Put the list in order of total sales quantity.

    4. List the title, type, publisher ID and year-to-date sales for all titles that are of type business or psychology and arefrom publishers with the IDs 1389 or 0736. Put the list in descending order of type, then ascending order of title.

    5. List the id, first and last names, publisher name, and country of the publisher for all employees who work forpublishers that are NOT located in France or Germany. Put the list in order of country, then publisher name, then last

    name, then first name.

    6. What is the sum of extended prices (quantity times price) for all sales?

    7. List the title id, title, type, and author last and first names for all titles in the business or psychology categories. Put thelist in order of author last name, then title.

    8. List the order number, title id, title, quantity, and store name for all sales that involve titles with the IDs PS2091, orMC3021, OR are made to stores with one of the following names, 'Fricative Bookshop', 'Bookbeat'. Put the list in

    order of title.

    9. List the order number, store name, title, price, quantity, extended price (quantity * price), and author first and lastnames for all sales. Use the column name alias "Extended" for the extended price. Put the list in order of order

    number, then title.

    10.For sales that are either to the stores "Bookbeat" and "Eric the Read", or involve the book "Is Anger the Enemy", listthe order number, store name, title, price, quantity, extended price (quantity * price), and author first and last names

    for all sales. Use the column name alias "Extended" for the extended price. Put the list in order of order number, then

    title.

    11.List the title, publisher ID and year-to-date sales for all titles that have year-to-date sales greater than the averageyear-to-date sales for all titles. Put the list in descending order of year-to-date sales.

    12.List the title, publisher ID and name, and year-to-date sales for all titles that have year-to-date sales greater than one-halfthe average year-to-date sales for all titles. Put the list in descending order of year-to-date sales.

    13.List the title ID, and title for all titles from the publishers 'New Moon Books' or 'Romona Publishers'. Put the list inorder of title.You MUST NOT use a subquery(use a join).

    14.Produce the same output as in #13, but using a subquery, not a join.

    15.List the publisher name, city and country for all publishers that are in the same country as 'New Moon Books'. Put thelist in order of publisher name. (HINT: Use a subquery.)

    16.List the title, type and price of titles that have a price greater than the price of ALL titles of the type 'business'. Put thelist in order of price, then title.

    17.List the title, type and price of titles that have a price greater than the price of ANY titles of the type 'business'. Put thelist in order of price, then title.

    18.List the title ID, title of all titles along with the order number and order date of any sales that involve each title. Yourresults MUST include titles that do not have any sales yet. Put the list in order of title, then order date.

    19.List the title ID and number of sales involving each title. If a title has not had any sales yet, the number of sales shouldbe shown as zero. (Hint: You must use both the title and sales tables.) Put the list in order of number of sales.

    20.List the title, publisher name and price for all titles that have a price higher than the average price of all titles from thapublisher. (Hint: Use a correlated subquery.) Put the list in ascending order of name, then descending order of price.

  • 8/11/2019 ISM6217 David Norman SQL Homework

    3/16

    David Norman.txt

    David Norman [email protected]

    I 1 I

    SELECT AVG(qty) AS averageqty-sales

    FROM sales

    WHERE stor d IN (6380, 7896)

    J

    I 2 I

    SELECT title id, total ales

    FROM ( ~ ~ ~ ~ ~ ~ - t i t l e - i d ,UM(qty) AS total-sales

    FROM sales GROUP Y title id) AS subquery

    WHERE total-sales

  • 8/11/2019 ISM6217 David Norman SQL Homework

    4/16

    David Norman.txt

    WHERE sales.stor-id

    =

    stores.stor id

    AND sales.title-id

    =

    titles.title id

    AND titles.title-id = titleauthorTtitle-id

    AND tit1eauthor.a~-id

    =

    auth0rs.a~-id

    ORDER BY sales.ord-num, titles.title

    /

    / *

    10 */

    SELECT aales.ord-num, storea.stor-name,

    titles.title, titles.price, sales.qty,

    aales.qty titles.price AS Extended,

    auth0rs.a~-fname, auth0rs.a~-lname

    FROM sales, titles, stores, titleauthor, authors

    WHERE sales.stor id

    =

    stores.stor-id

    AND sales.title id

    =

    titles.title-id

    AND titles.title id = titleauthor.title d

    AND titleauthor. id

    =

    auth0rs.a~-id

    AND

    (~~WE~(stores.~tor-name)

    N ('bookbeat', 'eric the read books')

    OR titles.title = 'Is Anger the Enemy?')

    ORDER

    Y

    sales.ord-nun, titles.title

    / * */

    SELECT title, pub d, ytd-sales

    FROM titles

    WHERE ytd ales > (SELECT AVG(ytd-sales) ,.

    FROM titles)

    ORDER BY ytd-sales DESC

    d

    / * 12 * /

    SELECT titles.title, titles.pub id,

    publishers.pub-name, tities.ytd-sales

    FROM titles, publishers

    WHERE titles.pub-id = publishers.pub-id

    AND titlea.ytd ales

    >

    (SELECT AVG(ytd alea)/2

    /

    FROM tit es

    ORDER BY titles.ytd-sales DESC

    / * 13 * /

    SELECT titles.title-id, titles.title

    FROM titles, publiahera

    WHERE titles.pub id = publishers.pub-id

    4

    AND ~~WE~(publis~ers.pub-name)N ('new moon books', 'romona publishers')

    ORDER BY titles.title

    / * 14

    * /

    SELECT title id, title

    FROM titles

    WHERE pub d IN (SELECT pub-id

    FROM publiahera

    WHERE LOWER(publishers.pub ame)

    IN ('new moon books', 'romona publishers'))

    ORDER Y title

    /*

    15

    */

    SELECT pub-name, city, country

    FROM publishers

    WHERE country

    =

    (SELECT TOP 1 country

    FROM publishers

    WHERE LOWER(pub-name)

    =

    'new moon books')

    ORDER Y pub-name

    SELECT title, type, price

    FROM titles

    WHERE price >

    WHERE LOWER(type)

    =

    'business')

    ORDER Y price, title

  • 8/11/2019 ISM6217 David Norman SQL Homework

    5/16

    David Norman.txt

    SELECT title, type, price

    FROM titles

    WHERE price > SELECT @ price)

    FROM tit es

    WHERE LOWER type) =

    ORDER BY price, title

    / 8 /

    SELECT titles.title-id, titles.title, sales.ord-num, sales.ord-date

    FROM titles, sales

    WHERE titles.title id

    =

    sales.title id

    ORDER BY titles.tiEle, sales.ord ate

    / 19 /

    SELECT titles.title-id, ISNULL SUM sales.qty), 0 AS sum-sales

    FROM titles LEFT JOIN sales

    ON titles.title id

    =

    sales.title-id

    GROUP BY titlesTtitle d ORDER BY sum ales

    /

    2

    /

    SELECT outertitles.title, publishers.pub-name, outertitles.price

    FROM titles outertitles, publishers

    WHERE outertitles.pub-id

    =

    publishers.pub-id

    AND outertitles.price

    >

    SELECT AVG innertit1es.price)

    FROM titles AS innertitles

    WHERE innertitles.pub-id

    =

    outertitles.pub-id)

    ORDER BY publishers.pub-name, outertitles.price DESC

    \J

  • 8/11/2019 ISM6217 David Norman SQL Homework

    6/16

    m: "David Norman"

    nt: Monday, February 28, 2005 5:28 AMbject: ISM6217 sql homework question

    Pag

    10

    BEGIN PGP SIGNED MESSAGE-----h: SHA1

    not clear on what to query for in numbers 16 and 17 of theework. I did the sum of the business titles in 16 and that waster than any of the single prices of any other titles, so it was aresult set.

    t I've come up with to get any results is just to query titlester than the most expensive business book in homework question 16get the titles of the lowest cost business book in 17. It just

    med a little too simple to switch between MAX() and MIN() for tworent questions, so I want to see if I'm going down the wrong path

    ot, especially since the most expensive business book technically

    NY of the business books, re: question 17.

    n I'm doing a subquery, right now I'm not putting aliases to thenames on the parent or subqueries. Does that create a speed

    e or do the parenthesis effectively block off the scope of eachy as long as the parser finds what it needs within the local querye? Regardless, would you prefer aliases to be added for what Iin as a readability issue or some other reason?

    questions like 19, I'm used to using "LEFT JOIN table ON ..."ax at work. Is that alright to use for homework and/or the test?

    6 */ECT title, type, priceM titles

    ERE price > (SELECT MAX(price)FROM titlesWHERE LOWER(type) = 'business')

    DER BY price, title

    7 */ECT title, type, priceM titles

    ERE price > (SELECT MIN(price)FROM titlesWHERE LOWER(type) = 'business')

    DER BY price, title

    9 */ECT titles.title_id, ISNULL(SUM(sales.qty), 0) AS sum_salesM titles LEFT JOIN sales

    titles.title_id = sales.title_idOUP BY titles.title_id ORDER BY sum_salesBEGIN PGP SIGNATURE-----

    ion: GnuPG v1.4.0 (MingW32)

  • 8/11/2019 ISM6217 David Norman SQL Homework

    7/16

    mment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

    DBQFCIuRRqLBH+DmBuAIRAqC6AKC4pXh98xX9e56K8Ap7oSlhwxUd2QCgo7Y9kZuk7hPH8cuN3Y+hllGc=IIEND PGP SIGNATURE-----

    Pag

    10

  • 8/11/2019 ISM6217 David Norman SQL Homework

    8/16

    David Norman.rpt

    David Norman [email protected]

    average-qty-sales

    13

    1

    row(s) affected)

    title d total sales

    (7 row(s) affected)

    stor-id Total-Sales

    7896 60 V

    8042 80

    (2 row(s) affected)

    title

    type pub-id ytd-sales

    ..............................................................................

    me

    Emotional Security: A New Algorithm

    psychology 0736 3336

    Is Anger the Enemy?

    psychology 0736 2045

    Life Without Fear

    psychology 0736 111

    Prolonged Data Deprivation: Four Case Studies

    psychology 0736 4072

    Cooking with Computers: Surreptitious Balance Sheets

    business 1389 3876

    Straight Talk About Computers

    business 1389 4095

    The Busy Executive s Database Guide

    business 1389 4095

    You Can Combat Computer Stress1

    business 0736 18722

    (8 row(s) affected)

    pub id fname lname pub-name

    couiit r

    ....................

    1389 Pedro

    Infosystems

    1389 Aria

    Infosystems

    1389 Maria

    Infosystems

    1389 Yoshi

    Infosystems

    1389 Sven

    Infosystems

    1389 Miguel

    Infosystems

    1389 Paula

    Infosystems

    1389

    Diego

    Af onso

    USA

    Cruz

    USA

    Larsson

    USA

    Lat imer

    USA

    Ottlieb

    USA

    Pa01 ino

    USA

    Parente

    USA

    Roe1

    Algodata

    Algodata

    Algodata

    Algodata

    Algodat a

    Algodat a

    Algodat a

    Algodat a

  • 8/11/2019 ISM6217 David Norman SQL Homework

    9/16

    David Norman.rpt

    Infosystems

    1389 Carine

    Infosystems

    1389 Margaret

    Infosystems

    0877 Paolo

    USA

    0877 Victoria

    USA

    0877 Helen

    USA

    0877 Lesley

    USA

    0877 Anabela

    USA

    0877 Peter

    USA

    0877 Paul

    USA

    0877 Elizabeth

    USA

    0877 Martine

    USA

    0877 Daniel

    USA

    1622 Rita

    Publishing

    0736 Palle

    USA

    0736 Karin

    USA

    0736 Matti

    USA

    0736 Laurence

    USA

    0736 Roland

    USA

    0736 Timothy

    USA

    0736 Mary

    USA

    0736 Howard

    USA

    0736 Martin

    USA

    0736 Gary

    USA

    1756 Maria

    USA

    9952 Francisco

    USA

    9952 Philip

    USA

    9952 Ann

    USA

    35 row 8) affected)

    extended

    .....................

    6676.9000

    I

    1 row 8) affected)

    title-id title

    type au-lname

    --------

    USA

    Schmitt

    USA

    Smith

    USA

    Accort i

    Ashworth

    Bennett

    Brown

    Domingues

    Franken

    Henriot

    Lincoln

    Rance

    Tonini

    Muller

    USA

    Ibsen

    Josephs

    Karttunen

    Lebihan

    Rourke

    Saveley

    Snyder

    Sommer

    Thomas

    Pontes

    Chang

    Cramer

    Devon

    Algodata

    Algodata

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Binnet Hardley

    Five Lakes

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    New Moon Books

    Ramona Publishers

    Scootney Books

    Scootney Books

    Scootney Books

    au-f name

  • 8/11/2019 ISM6217 David Norman SQL Homework

    10/16

    David Norman.rpt

    BU1032 The Busy Executive's Database Guide

    business Bennet Abraham

    BU1032 The Busy Executive's Database Guide

    business Green Marjorie

    BU2075 You Can Combat Computer Stressl

    business Green Marjorie

    PSI372 Computer Phobic AND Non-Phobic Individuals: Behavior Variations

    psychology Karsen Livia

    PS7777 Emotional Security: A New Algorithm

    psychology Locksley Charlene

    PSI372 Computer Phobic AND Non-Phobic Individuals: Behavior Variations

    psychology MacFeather Stearns

    BUllll Cooking with Computers: Surreptitious Balance Sheets

    business MacFeather Stearns

    BUllll Cooking with Computers: Surreptitious Balance Sheets

    business O'Leary Michael

    PS2091 Is Anger the Enemy?

    psychology Ringer Anne

    PS2091 Is Anger the Enemy?

    psychology Ringer Albert

    PS2106 Life Without Fear

    psychology Ringer Albert

    BU7832 Straight Talk About Computers

    business Straight Dean

    PS3333 Prolonged Data Deprivation: Four Case Studies

    psychology White Johnson

    (13 row(s) affected)

    ord num title d title

    q t y stor-name

    ....................

    ..............................................................................

    ........................................

    QA879.1 PC1035 But Is It User Friendly?

    3 Bookbeat

    P723 BUllll Cooking with Computers: Surreptitious Balance

    Sheets 2 Bookbeat

    722a PS2091 Is Anger the Enemy?

    3 Eric the Read Books

    QA7442.3 PS2091 Is Anger the Enemy?

    75 Barnum s

    D4482 PS2091 Is Anger the Enemy?

    10 News Brews

    N914008 PS2091 Is Anger the Enemy?

    2 Doc-U-Mat: Quality Laundry and Books

    TQ456 MC2222 Silicon Valley Gastronomic Treats

    10 Fricative Bookshop

    442299 BU7832 Straight Talk About Computers

    15 Fricative Bookshop

    423LL930 BU1032 The Busy Executive's Database Guide

    10 Bookbeat

    N914014 MC3021 The Gourmet Microwave

    2 Doc-U-Mat: Quality Laundry and Books

    423LL922 MC3021 The Gourmet Microwave

    15 Bookbeat

    X999 BU2075 You Can Combat Computer Stress

    35 Fricative Bookshop

    (12 row(s) affected)

    ord-num stor name title

    price q t y Extended au-f name

    au-lname

    ....................

    ..............................................................................

    -- ..................... ..................... ....................

    ........................................

    423LL922 Bookbeat The Gourmet

  • 8/11/2019 ISM6217 David Norman SQL Homework

    11/16

    David Norman.rpt

    Microwave 2.9900

    15 44.8500 Michel DeFrance

    423LL922 Bookbeat The Gourmet

    Microwave 2.9900

    15 44.8500 Anne Ringer

    423LL930 Bookbeat The Busy

    Executive s Database Guide

    19.9900 10 199.9000 Marjorie Green

    423LL930 Bookbeat The Busy

    Executive s Database Guide

    19.9900 10 199.9000 Abraham Bennet

    6871 Eric the Read Books The Busy

    Executive s Database Guide

    19.9900 5 99.9500 Marjorie Green

    6871 Eric the Read Books The Busy

    Executive s Database Guide

    19.9900 5 99.9500 Abraham Bennet

    722a Eric the Read Books Is Anger the

    Enemy? 10.9500

    3 32.8500 Anne Ringer

    722a Eric the Read Books Is Anger the

    Enemy? 10.9500

    3 32.8500 Albert Ringer

    A2976 Barnum s Secrets of

    Silicon Valley 20.0000

    5 1000.0000 Ann

    A2976 Barnum s Secrets of

    Silicon Valley 20.0000

    5 1000.0000 Sheryl

    D4482 News Brews Is Anger the

    Enemy? 10.9500

    10 109.5000 Anne

    D4482 News Brews Is Anger the

    Enemy? 10.9500

    10 109.5000 Albert Ringer

    N914008 Doc-U-Mat: Quality Laundry and Books Is Anger the

    Enemy? 10.9500

    20 219.0000 Anne Ringer

    N914008 Doc-U-Mat: Quality Laundry and Books Is Anger the

    Enemy? 10.9500

    20 219.0000 Albert Ringer

    N914014 Doc-U-Mat: Quality Laundry and Books The Gourmet

    Microwave 2.9900

    2 74.7500 Michel DeFrance

    N914014 Doc-U-Mat: Quality Laundry and Books The Gourmet

    Microwave 2.9900

    2 74.7500 Anne Ringer

    P2121 News Brews Fifty Years in

    Buckingham Palace Kitchens 11.9500

    20 239.0000 Reginald Blotchet-Halls

    P2 2 News Brews Onions, Leeks,

    and Garlic: Cooking Secrets of the Mediterranean 20.9500

    40 838.0000 Sylvia Panteley

    P2 2 News Brews Sushi, Anyone?

    14.9900 2 299.8000 Michael

    Leary

    P2121 News Brews Sushi, Anyone?

    14.9900 20 299.8000 Burt

    Gringlesby

    P2 2 News

    Brews Sushi, Anyone?

    14.9900 20 299.8000 Akiko

    Yokomot

    P3087a Doc-U-Mat: Quality Laundry and Books Computer Phobic

    AND Non-Phobic Individuals: Behavior Variations 21.5900

    20 431.8000 Stearns MacFeather

    P3087a Doc-U-Mat: Quality Laundry and Books Computer Phobic

    AND Non-Phobic Individuals: Behavior Variations 21.5900

    2 431.8000 Livia Karsen

    P3087a Doc-U-Mat: Quality Laundry and Books Emotional

    Dull

    Hunter

    Ringer

  • 8/11/2019 ISM6217 David Norman SQL Homework

    12/16

    David Norman. r p t

    S e c u r i t y :

    New

    Algor i thm

    25 199.7500 C h ar l en e Locks ley

    P3087a Doc-U-Mat: Q u a l i t y Laundry and Books

    F e a r

    25 175.0000 A l b e r t R i n g e r

    P3087a Doc-U-Mat: Q u a l i t y Laundry and Books

    Dep r i v a t i o n : Four Case S t u d i e s

    1 5 299.8500 Johnson White

    P723 Bookbeat

    Computers: S u r r e p t i t i o u s Balance S h e e t s

    25 298.7500 Michael

    P723 Bookbeat

    Computers: S u r r e p t i t i o u s Balance S h e e t s

    25 298.7500 S t e a r n s

    QA7442.3 Barnum

    s

    Enemy?

    75 821.2500 Anne

    QA7442.3 Barnum a

    Enemy?

    75 821.2500 A l b e r t

    QA879.1 Bookbeat

    F r i e n d l y ?

    30 688.5000 Chery l

    QQ2299 F r i c a t i v e Bookshop

    About Computers

    15 299.8500 Dean

    TQ456 F r i c a t i v e Bookshop

    Gastronomic T r e a t s

    10 199.9000 In n es

    X999 F r i c a t i v e Bookshop

    Computer S t r e s s l

    35 104.6500 M a r j o r i e

    R i n g e r

    R i n g e r

    Carson

    ( 34 r o w ( s) a f f e c t e d )

    L i fe W i t h o u t

    7.0000

    Prolonged Data

    19.9900

    Cooking with

    11.9500

    Leary

    Cooking wi th

    11.9500

    MacFeather

    s

    An g er t h e

    10.9500

    s Ang er t h e

    10.9500

    But s t U s e r

    22.9500

    S t r a i g h t T al k

    19.9900

    S t r a i g h t

    S i l i c o n V a l l e y

    19.9900

    d e l C a s t i l l o

    You Can Combat

    2.9900

    Green

    ord-num

    s t o r

    name

    p r i c e qty- Extended au- f name

    au-lname

    ........................................

    ..............................................................................

    ..................... ------ ..................... ....................

    ........................................

    423LL922 Bookbeat The Gourmet

    Microwave 2.9900

    1 5 44.8500 Michel DeFrance

    423LL922 Bookbeat The Gourmet

    Microwave 2.9900

    1 5 44.8500 Anne Ringer

    423LL930 Bookbeat The Busy

    E x e c u t i v e s Da t ab as e Guide

    19.9900 1 0 199.9000 M a r j o r i e Green

    423LL930 Bookbeat The Busy

    E x e c u t i v e s Da t ab as e Guide

    19.9900 1 0 199.9000 Abraham Bennet

    6871 E r i c t h e Read Books The Busy

    E x e c u t i v e s Da t ab as e Guide

    19.9900 5 99.9500

    Marjorie

    Green

    6871 E r i c t h e Read ~ o o k s The Busy

    E x ecu t i v e s Database Guide

    19.9900 5 99.9500 Abraham Bennet

    722a E r i c t h e Read Books

    s

    Anger t h e

    Enemy? 10.9500

    3 32.8500 Anne

    722a E r i c t h e Read Books s Anger t h e

    Enemy? 10.9500

    3 32.8500 A l b e r t

    D4482 News B r e w s s Anger t h e

    Enemy? 10.9500

    10 109.5000 Anne

    R i n g e r

    R i n g e r

    Ringer

    t i t l e

  • 8/11/2019 ISM6217 David Norman SQL Homework

    13/16

    David Norman.rpt

    D4482 News Brews

    Enemy?

    10 109.5000 Albert Ringer

    N914008 Doc-U-Mat: Quality Laundry and Books

    Enemy?

    2 219.0000 Anne Ringer

    N914008 Doc-U-Mat: Quality Laundry and Books

    Enemy?

    20 219.0000 Albert Ringer

    P723 Bookbeat

    Computers: Surreptitious Balance Sheets

    2 298.7500 Michael

    P723 Bookbeat

    Computers: Surreptitious Balance Sheets

    2 298.7500 Stearns

    QA7442.3 Barnum s

    Enemy?

    75 821.2500 Anne

    QA7442.3 Barnum s

    Enemy?

    75 821.2500 Albert

    QA879.1 Bookbeat

    Friend1 ?

    3 688.5000 Cheryl

    Ringer

    Ringer

    Carson

    Is Anger th e

    10.9500

    Is Anger the

    10.9500

    Is Anger the

    10.9500

    Cooking with

    11.9500

    Cooking with

    11.9500

    MacFeather

    Is Anger the

    10.9500

    Is Anger the

    10.9500

    But Is It User

    22.9500

    (17 row(s) affected),

    title

    pub-id ytd-sales

    ..............................................................................

    The Gourmet Microwave

    0877 22246

    You Can Combat Computer Stressl

    0736 18722

    Fifty Years in Buckingham Palace Kitchens

    0877 15096

    But Is It User Friendly?

    1389 8780

    (4 row(s) affected)

    Warning: Null value is eliminated by an aggregate or other SET operation.

    title

    pub-id pub-name ytd-sales

    The Gourmet Microwave

    0877 Binnet Hardley 22246

    You Can Combat Computer Stressl

    0736 New Moon Books 18722

    Fifty Years in

    Buckingham Palace Kitchens

    0877 Binnet Hardley 15096

    But Is It User Friendly?

    1389 Algodata Infosystems 8780

    Secrets of Silicon Valley

    1389 Algodata Infosystems 4095

    Straight Talk About Computers

    1389 Algodata Infosystems 4095

    The Busy Executive s Database Guide

    1389 Algodata Infosystems 4095

    Sushi, Anyone?

    0877 Binnet Hardley 4095

    Prolonged Data Deprivation: Four Case Studies

    736

    New

    Moon Books 4072

    Cooking with Computers: Surreptitious Balance Sheets

    1389 Algodata Infosystems 3876

    Emotional Security: A New Algorithm

    0736 New Moon Books 3336

  • 8/11/2019 ISM6217 David Norman SQL Homework

    14/16

    David Norman.rpt

    (11 row(s) affected)

    c

    Warning: Null value is eliminated by an aggregate or other SET operation.

    title-id title

    PS7777 Emotional Security: A New Algorithm

    PS2091 Is Anger the Enemy?

    PS2106 Life Without Fear

    PS3333 Prolonged Data Deprivation: Four Case Studies

    BU2075 You Can Combat Computer Stressl

    (5 row(s) affected)

    title d title

    --

    PS7777 Emotional Security: A New Algorithm

    PS2091 Is Anger the Enemy?

    PS2106 Life Without Fear

    PS3333 Prolonged Data Deprivation: Four Case Studies

    BU2075 You Can Combat Computer Stressl

    (5 row(s) affected)

    pub-n ame

    ........................................

    Algodata Infosystems

    Binnet Hardley

    Five Lakes Publishing

    New Moon Books

    Ramona Publishers

    Scootney Books

    /

    city country

    ....................

    Berkeley

    Washington

    Chicago

    Boston

    Dallas

    New York

    USA

    USA

    USA

    USA

    USA

    USA

    (6 row(s) affected)

    title

    type price

    me .....................

    Life Without Fear

    psychology 7.0000

    Emotional Security: A New Algorithm

    psychology 7.9900

    Is Anger the Enemy?

    psychology 10.9500

    Cooking with Computers: Surreptitious Balance Sheets

    business 11.9500

    Fifty Years in Buckingham Palace Kitchens

    trad cook 11.9500

    ~u sh T, nyone?

    trad-cook 14.9900

    Prolonged Data Deprivation: Four Case Studies

    psychology 19.9900

    Silicon Valley Gastronomic Treats

    mod-cook 19.9900

    Straight Talk About Computers

    business 19.9900

    The Busy Executive s Database Guide

    business 19.9900

    Secrets of Silicon Valley

    popular-comp 20.0000

    Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean

    trad-cook 20.9500

    Computer Phobic AND Non-Phobic Individuals: Behavior Variations

  • 8/11/2019 ISM6217 David Norman SQL Homework

    15/16

    David Norman.rpt

    psychology 21.5900

    But Is It User Friendly?

    popular-comp 22.9500

    Jd

    row(s) affected)

    title

    type price

    ..............................................................................

    Secrets of Silicon Valley

    popular-comp 20.0000

    Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean

    trad-cook 20.9500

    Computer Phobic AND Non-Phobic Individuals: Behavior Variations

    psychology 21.5900

    But Is It User Friendly

    popular-comp 22.9500

    (4 row(s) affected)

    title-id title

    ord-num

    ord-date

    ..............................................................................

    ......................................................

    PC1035 But Is It User Friendly?

    QA879.1 1993-05-22 00:00:00.000

    PS1372 Computer Phobic AND Non-Phobic Individuals: Behavior Variations

    P3087a 1993-05-29 00:00:00.000

    Bull11 Cooking with Computers: Surreptitious Balance Sheets

    P723 1993-03-11 00:00:00.000

    PS7777 Emotional Security:

    A

    New Algorithm

    P3087a 1993-05-29 00:00:00.000

    TC4203 Fifty Years in Buckingham Palace Kitchens

    P2121 1992-06-15 00:00:00.000

    PS2091 Is Anger the Enemy?

    722a 1994-09-13 00:00:00.000

    PS2091 Is Anger the Enemy?

    QA7442.3 1994-09-13 00:00:00.000

    PS2091 Is Anger the Enemy?

    D4482 1994-09-14 00:00:00.000

    PS2091 Is Anger the Enemy?

    N914008 1994-09-14 00:00:00.000

    PS2106 Life Without Fear

    P3087a 1993-05-29 00:00:00.000

    PC9999 Net Etiquette

    NULL NULL

    TC3218 Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean

    P2 2 1992-06-15 00:OO:OO.OOO

    PS3333 Prolonged Data Deprivation: Four Case Studies

    P3087a 1993-05-29 00:00:00.000

    PC8888 Secrets of Silicon Valley

    A2976 1993-05-24 00:00:00.000

    MC2222 Silicon Valley Gastronomic Treats

    TQ456 1993-12-12 00:00:00.000

    BU7832 Straight Talk About Computers

    QQ2299 1993-10-28 00:00:00.000

    TC7777 Sushi, Anyone?

    P2121 1992-06-15 00:00:00.000

    BU1032 The Busy Executive s Database Guide

    6871 1994-09-14 00:00:00.000

    BU1032 The Busy Executive s Database Guide

    423LL930 1994-09-14 00:00:00.000

    MC3021 The Gourmet Microwave

    N914014 1994-09-14 00:00:00.000

    MC3021 The Gourmet Microwave

    423LL922 1994-09-14 00:00:00.000

    MC3026

    The Psychology of computer Cooking

  • 8/11/2019 ISM6217 David Norman SQL Homework

    16/16

    David Norman.rpt

    NULL NULL

    BU2075 You Can Combat Computer Stress

    X999 1993-02-21 00:00:00.000

    (23 row(s) affected)

    title-id sum-sales

    --------

    -----------

    MC3026 0

    PC9999 0

    MC2222

    BU1032

    BU7832 15

    PS3333 15

    PS1372 20

    TC4203 20

    TC7777 20

    PS2106 25

    PS7777 25

    BUllll 25

    PC1035 30

    BU2075 35

    MC3021 40

    TC3218 40

    PC8888 50

    PS2091 108

    (18 row(s) affected)

    Warning: Null value is eliminated by an aggregate or other SET operation.

    title

    pub-name price

    ..............................................................................

    -- ........................................

    em

    But Is It User Friendly?

    Algodata Infosystems 22.9500

    Secrets of Silicon Valley

    Algodata Infosystems 20.0000

    Straight Talk About Computers

    Algodata Infosystems 19.9900

    The Busy Executive's Database Guide

    Algodata Infosystems 19.9900

    Computer Phobic AND Non-Phobic Individuals: Behavior Variations

    Binnet Hardley 21.5900

    Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean

    Binnet Hardley 20.9500

    Silicon Valley Gastronomic Treats

    Binnet Hardley 19.9900

    Prolonged Data Deprivation: Four Case Studies

    New Moon Books 19.9900

    Is Anger the Enemy?

    New Moon Books L/ 10.9500

    (9 row(s) affected)

    Warning: Null value is eliminated by an aggregate or other SET operation.