Find out which patients have not been discharged yet

Assignment Help Other Subject
Reference no: EM13773916

Part A - SQL Queries

Use the hospital database (hosp2010.sql) from the Interact Resources site. Answer the following queries from that database.
You are required to submit:

1. The appropriate SQL statements for each query, which should be copied from your SQL code in MySQL and pasted into your submission file

2. Screenshots of the resultant tables which are to be pasted into your submission file immediately after the SQL code for that query.
Typing or manually drawing the results is NOT acceptable.

Question 1

Find out what actual operations were performed by the surgeon 103. List the surgeon code, the code of the actual operation and the date the operation was performed. Show the operation date by the day of the week, the day of the month, the month and the year (ie: Tuesday, 7 October, 2014). Sort the list in most recent date of operation.

Question 2

Find out which patients have not been discharged yet, listing their last name and the date they were admitted. Show the admission date by the day of the month, month and the full year (ie: 6/12/2001).

Question 3

List all the persons who were admitted to the Flemming Ward prior to 1995. Show the persons first and last name, ward name and the date of their admission. Show the admission date by the day of the month, month and the full year (ie: 6/12/2001).

Question 4

For the patients who have been discharged, show the number of days that they stayed at a ward. Also show the patients ID and last name, ward code and the date of admission. Show the admission date by the day of the week, the day of the month, the month and the year (ie: Tuesday, 7 October, 2014). Sort the list in most recent date of admission.

Question 5

1. List the first name and surname of male patients from NSW or ACT (i.e. the postcode is in the 2000's), who have had an operation and recovered in either the Pasteur or the Fleming ward. Mention them only once if they recovered in the same ward more than once.

2. After executing your query, explain the logic of your SQL statement/s (for example, why/how you joined tables and for what reason, etc.), and do this for each part of this query.

Reference no: EM13773916

Questions Cloud

Obtain the fourier series which represents function : Obtain the fourier series which represents function f(t)=0 -2pi/w
The health status of a country plays : You are currently working as an administrative assistant for a large metropolitan hospital. You have been asked to prepare an article for the hospital newsletter about international health care. The following are the items you have been asked to i..
Expand aggregate demand-money supply : If the central bank wants to expand aggregate demand, it can ________ the money supply, which would ________ the interest rate.
Is there a hate or bias crime law in existence in your state : Is there a hate or bias crime law in existence in your state? If not, select a neighboring state to examine so that you are able to complete the assignment. If you live outside of the United States, pick any state to examine that has these laws
Find out which patients have not been discharged yet : Find out which patients have not been discharged yet, listing their last name and the date they were admitted. Show the admission date by the day of the month, month and the full year (ie: 6/12/2001).
Future business conditions and invest in capital equipment : Suppose firms become very optimistic about future business conditions and invest heavily in new capital equipment. Show the short-run effect of this optimism on the aggregate-demand curve. Which of the following reasons could explain why the aggregat..
Write a reflaction paper on the movie les miserables : Write a reflaction paper on the movie Les Miserables 1998. Reflect on one of 3 issues: Social justice: class, gender, economic, etc.
Cloud computing on traditional it infrastructure : Describe the effect of cloud computing on traditional IT infrastructure.
How much gravitational potential energy did the barbells hav : A championship weight lifter did 1.10 * 10 to the power of 4 J of work on a set of barbells weighing 3680N. How much gravitational potential energy did the barbells have at the maximum height of a lift?

Reviews

Write a Review

Other Subject Questions & Answers

  Certain constitutional rights

Should juvenile offenders have a constitutional right to a jury trial? Should each state make that determination? Discuss the legal decision that addresses this issue.

  Write a paragraph in which you present the main ideas you

r.e.c. inc.s staff of accountants finished preparing the financial statements for 2010 and will meet next week with the

  Mentoring to develop ethical employees

According to business professor Linda Treviño, ethical behavior in organizations depends less on formal training programs than on such management practices as ethical leadership. Perhaps most important is creating an environment in which employees..

  The body snatcher

The Body Snatcher

  Based on what you have read do you believe that pollution

this weeks environmental controversy focuses on bottled water in terms of its health safety and financial issues.

  Emotional and mental challenges

What are some emotional and mental challenges with decisions as you enter young adulthood? Explain. Pls answer in 120 words or less."

  What is the food web for the twilight

What ocean(s)have the twilight zone? What is the food web for the twilight?

  Slander and libel

Which of the following is slander rather than libel? A defamatory statue. A defamatory TV broadcast.

  Part of marketing plan

Results from the research that have already been conducted are displayed in which of the following part of marketing plan?

  A full description of the communication issue describe the

a. a full description of the communication issue. describe the context the principle players and the outcome of the

  Implement the changes gradually

Managers should make changes only when they are absolutely necessary, should announce them well in advance, and should implement the changes gradually.

  What is philosophy and what are its purposes-methods

What is philosophy, and what are its purposes, methods, and relevance to living? Can philosophy be of any value in determining both what the good life is and how best to achieve it? If so, why and how? If not, why and how not?

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