Write an sql statement to display breed and type of all pets

Assignment Help PL-SQL Programming
Reference no: EM131291693

Database Applications SQL Q&A and Hands-On

Part B: Use the Week 3 Assignment Pet_Database File for this section of the assignment. In the PET table, delete the PetDOB field and add a numeric PetCost field. Populate this field with appropriate values. Save the changes to the PET table. Create SQL queries to do the following:

• Display the last name and phone number of all dog owners. Use a subquery to do this.
• Display the first and last name of owners and the type of animal of all unknown breeds.
• Display the pet name and owner last name of all dogs.

Save all 3 queries.

Export the PET table to an Excel spreadsheet. Create a Pivot table. Have the cost display as currency. Take screen shots* of two different views without a report filter and paste the screen shots into a Word document. Then add a report filter and choose one value for it, take a screen shot, then choose a different value for the same filter and take another screen shot. Paste those into the Word document containing the first two screen shots. You should now have 4 screen shots in this Word document. Save the Word document as Screen shots. Save the pivot table as Pivot.

You will have 4 files submitted for this assignment: the Word document with your paper from Part A, the Microsoft Access Pet_Database file, the Screen shots Word file, and the Pivot file.

*To take a screen shot, have the proper information on your screen, hit the PrntScr button, and then paste into the Word document.

SQL Q&A and Hands-On

Please include the questions with your answers. Answer in complete sentences where applicable.

1. Does all standard SQL work in Microsoft Access? Explain.

2. List and describe the four basic SQL data types.

3. List and describe five SQL built-in functions. The best way to learn SQL is by actually using it. In the following problems, we will use SQL to create, populate, and query a small database. Use SQL in Microsoft Access to complete the problems. Save all queries as instructed in the problem. Submit the database file (save as Pet_Database.accdb and KEEP THIS FILE for use with a later assignment) with all your queries in addition to the Word document containing the questions and answers for numbers 1, 2, and 3.Use the following information for problems 4 - 10:Tables:PET_OWNER (OwnerID, OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail)PET (PetID, PetName, PetType, PetBreed, PetDOB, OwnerID)**Note: OwnerID is italicized to indicate the Foreign Key**Data:

4. Write an SQL CREATE TABLE statement to create the PET_OWNER table, with OwnerID as a surrogate key. Save as CreatePetOwner.

5. Write a set of SQL INSERT statements to populate the PET_OWNER table with the data given above. Save as PopulatePetOwner.

6. Write an SQL CREATE TABLE statement to create the PET table, with PetID as a surrogate key. Save as CreatePet.

7. Write a set of SQL INSERT statements to populate the PET table with the data given above. Save as PopulatePet.

8. Write an SQL statement to display the breed and type of all pets. Save as AllBreeds.

9. Write an SQL statement to display the breed, and DOB of all pets having the type Cat. Save as Cats.

10. Write an SQL statement to display the first name, last name, and email of all owners, sorted in alphabetical order by last name. Save as AlphaOwners.

11. Write an SQL statement to display all the owners' names, with the first name in all lower case and the last name in all upper case. Save as UpperLower.

12. Write an SQL statement to display the total number of pets. Save as TotalPets.

13. Write an SQL statement to display the last name, first name and email of any owner who has a NULL value for OwnerPhone. (Note: there should be one owner who has a NULL value for OwnerPhone.) Save as PhoneNull.

14. Write an SQL statement to count the number of distinct breeds. Save as NumberOfBreeds.

15. Write an SQL statement to display the names of all the dogs. Save as Dogs.

Reference no: EM131291693

Questions Cloud

Discuss how the contents of a directory are impacted : Discuss how the contents of a directory are impacted (and when and/or if they are available for use) when a file system is mounted on that directory.
Demonstrate understanding and mastery of the course content : Demonstrate understanding and mastery of the course content through application to your personal leadership context and are evaluated on depth of insight, accuracy of application and integration of relevant course concepts.
What types of social studies objectives and goals : What types of social studies objectives/ goals could be met by this technology and how? Please relate to a NCSS main theme (or more than one if appropriate).
Discuss about the clinical and forensic evaluation : identify at least one difference between the two types of evaluations (forensic psychological and traditional clinical psychological) in each of the following areas:Interviewing,Discussion of informed consent,Testing and assessment,Writing reports.
Write an sql statement to display breed and type of all pets : Write an SQL statement to display the breed and type of all pets. Save as AllBreeds. Write an SQL statement to display the breed, and DOB of all pets having the type Cat. Save as Cats.
Which industries will be most negatively impacted : Which industries will be most negatively impacted by this action, and why?- Which industries (if any) might be positively impacted by this action, and why?
Estimating the modularizing code : Imagine you are a part of a team that is tasked with writing a mobile application (app) that will allow users to send pictures to their friends. The manager does not want to waste time creating code modules. Describe at least one (1) advantage of ..
Evaluate the forensic psychology and risk assessment : Evaluate the forensic psychology and risk assessment.Identify and describe the role and purpose of the report. Comment on whether the evaluation was or was not necessary. State the reasons for your opinion.
Development of applications in a clustered environment : What advantage does the aggregate data model offer for development of applications in a clustered environment? How does aggregate orientation (i.e., the aggregate data model compare to the relational model? How do NoSQL databases differ from the rela..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Write a select statement that answers the problem

Write a SELECT statement that answers this problem - Which products have a list price that's greater than the average list price for all products?

  Write a program that does simplified bgp route advertising

Additionally, it will periodically check the modification time of the routing table file and if it detects that it has changed, it will re-read it and send BGP UPDATEs reflecting the changes to all connected peers. This functionality is described i..

  Prepare sql queries to find the customers

Prepare SQL queries to find the customers who have reserved only 4-door cars.

  Rapidly evolving field

Project management has been a rapidly evolving field since its inception centuries ago. For project managers, doing the next project better than the current one has been a concern of paramount interest since project managers oversaw the building o..

  Sql give syntax of how to create table in sql and also give

give syntax of how to create table in sql and also give small demo to how to create table in sql.

  Write an application for the events

Closing the application. Close your running application by clicking its close box.

  Write a query to display the starting salary

Write a query to display the starting salary for each employee. The starting salary would be the entry in the salary history with the oldest salary start date for each employee. Sort the output by employee number.

  Write queries in sql and relational algebra

Write given queries in SQL and relational algebra: Determine cities from which one can fly to Toronto with one change of planes, and using same type of the aircraft for both legs of trip.

  Analyze how sql differs from a programming language

In addition to this, analyze how SQL differs from a programming language with which you are familiar. Explain your general opinions of SQL thus far, and classify it as easy or not, and as useful or not.

  Which is better to use, a sub query or a join

Please include example of each to support your reasoning. Also, please include references.

  Construct a query to show the expected payment date

Construct a query that will show the number of days that exist between the first invoice and last invoice, for each month, for each employee, using the DATEDIFF function. Be sure to provide the SQL script that will carry out this function.

  Sql concepts and database design

The Strayer Oracle Server may be used to test and compile the SQL Queries developed for this assignment. Your instructor will provide you with login credentials to a Strayer University maintained Oracle server.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd