sql data base design

ebzcvpureynxvfuber
timer Asked: Aug 21st, 2017

Question Description

-1. For questions 1 to 17 use the PUBS sample database created by Microsoft.

USE pubs;

--2. Display a list of publication dates and titles (books) that for whic no advance has been paid.

--3. Display a list of titles that have been categorized as something other than cooking. --Use the Books table.

--4. Display all authors whose whose last name is less then 9 characters long. Provide the length of the last name. --Provide column names for all columns.

--5. Display from publisher, book type, price, and title. --Rename the column type with ”Book Category.” Make the publisher column name human readable. --Sort by publisher and type (descending) and then price (ascending).

--6. Display title_id, pubdate and pubdate plus three days, using the Books table, for books that were published in June.

--7. Using the datediff function determine how much time has elapsed in months between the time the books were --published and sold. Provide the title and number of months. provide a meaningful title for each column.

--8. List the title IDs and quantity of all books that sold between 20 and 40 copies.

--9. Display a list of all last names of the authors who have an e in their last name and --the city where they ends in 'e'.

--10. Show the names of the stores where books are on net 60 payment terms. Use the Sales table.

--11. Display all authors whose first names are less than five letters long , end in N or E, and start with A.

--12. Display all titles that cost more than $20 and either begin with b or have a publisher ID of 0877.

--13. Display from the Employees table the first name (fname), last name (lname), employe ID(emp_id)-- and job level (job_lvl) columns for those employees with a job level greater than 200; and --rename the column headings to: “First Name,” “Last Name,” “IDENTIFICATION#” and “Job Level.” --Provide the employers name, as well order by employer.

--14. Display the books and publisher and royalty where the royalty is greater than 10 and less than 20.

--15. Display the first 40 characters of each title and the publishers along with the average monthly sales for --that title to date (ytd_sales/12). Use the Title table.

--16. Show how many books have null prices.

--17. Display a the highest priced book in of each type.Use the GROUP BY. Do not display Null values

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors