1. List the name, city, and state from the authors table, and the title, and type...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. List the name, city, and state from the authors table, and the title, and type from the titles table where the state of the author is CA or TN. The name of the author should be formatted as the last name followed by a comma and space followed by the first name. There should be a row produced in the result set for each row in the authors table. Order the result set by the author's last name. The query should produce the result set listed below. (Hint: LEFT OUTER JOIN statement) name Bennet, Abraham Carson, Cheryl Dull, Ann Stringer, Dirk White, Johnson Yokomoto, Akiko (20 row(s) affected) city Berkeley Berkeley Palo Alto title Oakland Menlo Park Walnut Creek state ૪૪૪ ૪૪૪ title The Busy Executive's Database Guide But Is It User Friendly? Secrets of Silicon Valley NULL NULL Prolonged Data Deprivation: Four Case Studies psychology Sushi, Anyone? trad_cook 2. Using the INSERT command, insert a new row into the employee table. The employee has an id of TYS54321M, a first name of John, a last name of Smith, a job id of 12, a job level of 25, a pub id of 0877, and a hire date of March 1, 2012. type 3. Using the UNION command, calculate new prices for the books bases on the current price for each book in the titles table. If the price is greater than or equal to $15.00 and less than or equal to $20.00, add 10% to the price of the book, and if the price is greater than $20.00, add 5% to the price of the book. Order the result set by the title. The query should produce the result set listed below. But Is It User Friendly? Computer Phobic AND Non-Phobic Individuals: Behavior Variations Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean Prolonged Data Deprivation: Four Case Studies Secrets of Silicon Valley Silicon Valley Gastronomic Treats Straight Talk About Computers The Busy Executive's Database Guide business popular_comp popular_comp price 22.95 21.59 20.95 19.99 20.00 19.99 19.99 19.99 new_price 24.097500 22.669500 21.997500 21.989000 22.000000 21.989000 21.989000 21.989000 4. List the sum of quantity, and the sum of the year to date sales for each order by store id, store name, quantity, and year to date sales where the sum of the quantity is greater than 10. Display the store id, and quantity from the sales table, the store name from the stores table, and the year to date sales from the titles table. The query should produce the result set listed below. stor_id 7066 7067 7131 7896 8042 stor_name Barnum's News & Brews Doc-U-Mat: Quality Laundry and Books Fricative Bookshop Bookbeat (5 row(s) affected) au_name Green Locksley MadFeather O'Leary (4 row(s) affected) 5. List all the authors in California who have written more than 1 book. au_fname Marjorie Charlene 5 4 3 4 50 62 Stearns Michael stor_id ord_num aty Average by Storid 6380 6871 6380 7066 A2976 7066 QA7442.3 75 62 7067 D4482 10 22 40 22 7067 P2121 7067 P2121 7067 P2121 20 22 20 22 7131 N914008 20 21 7131 N914014 25 21 7131 P3087a 20 21 7131 P3087 25 21 7131 P3057 15 21 25 21 7131 P3007 7896 QQ2299 15 20 7896 TQ456 10 20 7896 X99.9 35 20 423LL9022 15 20 8042 423LL930 10 20 8042 8042 P723 25 20 0042 QA879.1 30 20 quantity 125 90 130 60 6. List the average quantity, and the sum of the quantity from the sales table by store id, and the sum of the quantity of all the sales. Display the store id, order number, and quantity. The query should produce the result set listed below. (Hint: Use OVER) SubTotal by Storld 8 8 125 125 90 90 90 50 130 130 130 130 130 130 60 60 60 80 80 80 80 ytd_sales 6140 21611 32185 8 24849 38997 133 133 223 223 223 223 353 353 353 353 353 353 413 413 413 493 493 493 493 Running Total 8 1. List the name, city, and state from the authors table, and the title, and type from the titles table where the state of the author is CA or TN. The name of the author should be formatted as the last name followed by a comma and space followed by the first name. There should be a row produced in the result set for each row in the authors table. Order the result set by the author's last name. The query should produce the result set listed below. (Hint: LEFT OUTER JOIN statement) name Bennet, Abraham Carson, Cheryl Dull, Ann Stringer, Dirk White, Johnson Yokomoto, Akiko (20 row(s) affected) city Berkeley Berkeley Palo Alto title Oakland Menlo Park Walnut Creek state ૪૪૪ ૪૪૪ title The Busy Executive's Database Guide But Is It User Friendly? Secrets of Silicon Valley NULL NULL Prolonged Data Deprivation: Four Case Studies psychology Sushi, Anyone? trad_cook 2. Using the INSERT command, insert a new row into the employee table. The employee has an id of TYS54321M, a first name of John, a last name of Smith, a job id of 12, a job level of 25, a pub id of 0877, and a hire date of March 1, 2012. type 3. Using the UNION command, calculate new prices for the books bases on the current price for each book in the titles table. If the price is greater than or equal to $15.00 and less than or equal to $20.00, add 10% to the price of the book, and if the price is greater than $20.00, add 5% to the price of the book. Order the result set by the title. The query should produce the result set listed below. But Is It User Friendly? Computer Phobic AND Non-Phobic Individuals: Behavior Variations Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean Prolonged Data Deprivation: Four Case Studies Secrets of Silicon Valley Silicon Valley Gastronomic Treats Straight Talk About Computers The Busy Executive's Database Guide business popular_comp popular_comp price 22.95 21.59 20.95 19.99 20.00 19.99 19.99 19.99 new_price 24.097500 22.669500 21.997500 21.989000 22.000000 21.989000 21.989000 21.989000 1. List the name, city, and state from the authors table, and the title, and type from the titles table where the state of the author is CA or TN. The name of the author should be formatted as the last name followed by a comma and space followed by the first name. There should be a row produced in the result set for each row in the authors table. Order the result set by the author's last name. The query should produce the result set listed below. (Hint: LEFT OUTER JOIN statement) name Bennet, Abraham Carson, Cheryl Dull, Ann Stringer, Dirk White, Johnson Yokomoto, Akiko (20 row(s) affected) city Berkeley Berkeley Palo Alto title Oakland Menlo Park Walnut Creek state ૪૪૪ ૪૪૪ title The Busy Executive's Database Guide But Is It User Friendly? Secrets of Silicon Valley NULL NULL Prolonged Data Deprivation: Four Case Studies psychology Sushi, Anyone? trad_cook 2. Using the INSERT command, insert a new row into the employee table. The employee has an id of TYS54321M, a first name of John, a last name of Smith, a job id of 12, a job level of 25, a pub id of 0877, and a hire date of March 1, 2012. type 3. Using the UNION command, calculate new prices for the books bases on the current price for each book in the titles table. If the price is greater than or equal to $15.00 and less than or equal to $20.00, add 10% to the price of the book, and if the price is greater than $20.00, add 5% to the price of the book. Order the result set by the title. The query should produce the result set listed below. But Is It User Friendly? Computer Phobic AND Non-Phobic Individuals: Behavior Variations Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean Prolonged Data Deprivation: Four Case Studies Secrets of Silicon Valley Silicon Valley Gastronomic Treats Straight Talk About Computers The Busy Executive's Database Guide business popular_comp popular_comp price 22.95 21.59 20.95 19.99 20.00 19.99 19.99 19.99 new_price 24.097500 22.669500 21.997500 21.989000 22.000000 21.989000 21.989000 21.989000 4. List the sum of quantity, and the sum of the year to date sales for each order by store id, store name, quantity, and year to date sales where the sum of the quantity is greater than 10. Display the store id, and quantity from the sales table, the store name from the stores table, and the year to date sales from the titles table. The query should produce the result set listed below. stor_id 7066 7067 7131 7896 8042 stor_name Barnum's News & Brews Doc-U-Mat: Quality Laundry and Books Fricative Bookshop Bookbeat (5 row(s) affected) au_name Green Locksley MadFeather O'Leary (4 row(s) affected) 5. List all the authors in California who have written more than 1 book. au_fname Marjorie Charlene 5 4 3 4 50 62 Stearns Michael stor_id ord_num aty Average by Storid 6380 6871 6380 7066 A2976 7066 QA7442.3 75 62 7067 D4482 10 22 40 22 7067 P2121 7067 P2121 7067 P2121 20 22 20 22 7131 N914008 20 21 7131 N914014 25 21 7131 P3087a 20 21 7131 P3087 25 21 7131 P3057 15 21 25 21 7131 P3007 7896 QQ2299 15 20 7896 TQ456 10 20 7896 X99.9 35 20 423LL9022 15 20 8042 423LL930 10 20 8042 8042 P723 25 20 0042 QA879.1 30 20 quantity 125 90 130 60 6. List the average quantity, and the sum of the quantity from the sales table by store id, and the sum of the quantity of all the sales. Display the store id, order number, and quantity. The query should produce the result set listed below. (Hint: Use OVER) SubTotal by Storld 8 8 125 125 90 90 90 50 130 130 130 130 130 130 60 60 60 80 80 80 80 ytd_sales 6140 21611 32185 8 24849 38997 133 133 223 223 223 223 353 353 353 353 353 353 413 413 413 493 493 493 493 Running Total 8 4. List the sum of quantity, and the sum of the year to date sales for each order by store id, store name, quantity, and year to date sales where the sum of the quantity is greater than 10. Display the store id, and quantity from the sales table, the store name from the stores table, and the year to date sales from the titles table. The query should produce the result set listed below. stor_id 7066 7067 7131 7896 8042 stor_name Barnum's News & Brews Doc-U-Mat: Quality Laundry and Books Fricative Bookshop Bookbeat (5 row(s) affected) au_name Green Locksley MadFeather O'Leary (4 row(s) affected) 5. List all the authors in California who have written more than 1 book. au_fname Marjorie Charlene 5 4 3 4 50 62 Stearns Michael stor_id ord_num aty Average by Storid 6380 6871 6380 7066 A2976 7066 QA7442.3 75 62 7067 D4482 10 22 40 22 7067 P2121 7067 P2121 7067 P2121 20 22 20 22 7131 N914008 20 21 7131 N914014 25 21 7131 P3087a 20 21 7131 P3087 25 21 7131 P3057 15 21 25 21 7131 P3007 7896 QQ2299 15 20 7896 TQ456 10 20 7896 X99.9 35 20 423LL9022 15 20 8042 423LL930 10 20 8042 8042 P723 25 20 0042 QA879.1 30 20 quantity 125 90 130 60 6. List the average quantity, and the sum of the quantity from the sales table by store id, and the sum of the quantity of all the sales. Display the store id, order number, and quantity. The query should produce the result set listed below. (Hint: Use OVER) SubTotal by Storld 8 8 125 125 90 90 90 50 130 130 130 130 130 130 60 60 60 80 80 80 80 ytd_sales 6140 21611 32185 8 24849 38997 133 133 223 223 223 223 353 353 353 353 353 353 413 413 413 493 493 493 493 Running Total 8
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In Problem, find the indicated derivative. Find y (5) if d 2 y/dx 2 = 3 3x + 2.
-
Look at the data in Table 23.2 a. What is the price of a call option with an exercise price of $460 and expiration in September 2010? What if expiration is in January 2012? b. Why do you think the...
-
A railroad car weighs 30,000 lb and is traveling horizontally at 30 ft/s. At the same time another car weighing 10,000 lb is traveling 5 ft/s in the opposite direction. If the cars meet and couple...
-
Lucenay Interiors, a furniture store, was formed on January l, 2008, when lucenay issued common stock for \($400,000.\) Early in January, Lucena) made the following cash payments: a. \($100,000\) for...
-
Sara's Systems manufactures audio systems for cars. Two models are produced: The Standard model has a budgeted price of $200 and a standard variable cost of $80. The Blaster model has a budgeted...
-
5. Meera Ltd has furnished you the following data: Budgeted No. of working days 25 Production in units 20,000 Fixed overheads 30,000 Actual 27 22,000 31,000 Budgeted fixed OH rate is `1 per hour. In...
-
The model with all useable variables is? Round to 2 decimal places If an answer is 0 (Zero) enter 0.00 4 Price 25099.34 + A A/ * SqFt + Thatched Roof + 46 a
-
3. [20p] A final good is assembled with two components: R and U. The supplier of R is a regulated monopolist whose marginal and average cost of production is 4. Regulation can force the monopolist of...
-
What is the CLV (net of acquisition cost) if customer acquisition cost is $600 and expected contribution is $350 per period for a total of 5 periods?
-
Provide the link to your LinkedIn profile. Summarize the updates that you have made throughout the course. Also, review at least two peer profiles and share feedback on the following: Is the profile...
-
You just viewed a dialogue between the Scottish tutor and the Chinese Emperor. "Matters of words perhaps, but words are important."---tutor. "Why are words important?"---Emperor. "If you cannot say...
-
Martin Industries, Inc. signed a contract for the construction of their new headquarters building on January 1, 2020, with a total construction cost of $1,200,000. Work on the construction began on...
-
The accounting records of Placeless Wireless include the following as of December 31, 2024 (Click the icon to view the accounting records.) Requirements 1. Report these liabilities on the Placeless...
-
A dam is subjected to a linearly varying pressure p = po(1-2). The slice shown is assumed to be in plane strain. Neglect the body force of the dam, calculate the stress 011, 022, and 012 using the...
-
Draw a Feynman diagram for the reaction n + v p + .
-
Olive Corporation was formed and began operations on January 1, 2012. The corporation's income statement for the year and the balance sheet at year-end are presented below. The corporation made...
-
Carol Harris, Ph.D, CPA, is a single taxpayer and she lives at 674 Yankee Street, Durham, NC 27409. Her Social Security number is 793-52-4335. Carol is an Associate Professor of Accounting at a local...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family. The Incisors own a rental beach house in Hawaii. The beach house was rented for the full year during 2012...
-
What is the general reporting format on financial statements prepared in accordance with a comprehensive basis of accounting other than generally accepted accounting principles?
-
What is negative assurance within the context of an auditor's report? How does it differ from positive assurance?
-
What body establishes standards for a. All audits and for reviews of interim financial information and preparation of unaudited financial statements of public companies? b. Reviews and compilations...
Study smarter with the SolutionInn App