Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Select all rows and columns from the hospital _ basic table. 2 ) Select all the rows and columns from hospital _ basic where the

Select all rows and columns from the hospital_basic table.
2) Select all the rows and columns from hospital_basic where the Physician is not Molly Clock. (39 rows)
3) Select all rows and columns where the patient is Cary Richard from the hospital_basic table. (5 rows)
4) Select all the rows and columns where the patients name begins with C from the hospital_basic table. (10 rows)
5) Select all distinct rows and only the Name and Address columns from the hospital_basic table order by patient name. (24 rows)
6) Select all rows and show only the procedure, patient, physician and nurse columns, where the nurse is NULL in the hospital_basic table. (16 rows)
7) Select all rows and columns from hospital_basic where the patient is Cary Richard, and the surgeon is Todd Quinlan. (3 rows)
8) Select all the rows and columns from hospital_basic where the ID is between 10 and 20(inclusive) and the patient is not Cary Richard. (8 rows)
9) Select all rows from the hospital_basic table where the procedure is either Complete Walletectomy or Reversible Cryobobulation. Show only the procedure, name, and physician columns. (6 rows)
10) Select all distinct rows and only the physician and procedure columns from the hospital_basic table where the name of the procedure ends with ectomy. Order by physician. (19 rows)
11) Select all rows and only the physician, procedure, and date of procedure columns from the hospital_basic table where Molly Clock is the physician. Limit the results by showing only the 1 record with the latest date from date of procedure. (1 row)
Part 2
Introduction Follow the instructions to insert, update and delete data from the hospital_basic table. Complete the questions in order.
Notes:
1. You will need to turn off Update Safe mode in your Preferences. Go to Edit > Preferences > SQL Editor and uncheck Safe Updates
2. Column names may be omitted as long as the VALUES clause lists all column values in the same order as the table's columns.
3. Any number of rows may be added with a single INSERT statement.
4. Omitting the WHERE clause in a DELETE statement results in all rows in the table being deleted
5. Include all screenshots of each step in a single word document. Screenshots should include executed statements and output.Make sure to include screenshots or code of each step you complete to answer the questions
Steps:
Insert the following data into the hospital_basic table. Display all data from the table using a SELECT statement.
Antoinette Peterson lives at 567 Pancakes Street. She arrived on 2008-07-14 and got a DragonTeeth Replacement by Carlton McCclure on 2008-07-15 in Room 302. Antoinette stayed for two days. Her phone number on file is 555-6575
Angelica Sutton lives at 757 Waffle Rd. She arrived on 2008-07-02 and received a Psychicnuclear Robotectomy performed by Clara Booth on 2008-07-3in Room 103. Angelica stayed in the hospital for 5 days and did not provide a phone number.
UPDATE the following data in the table. Display all data from the table using a SELECT statement.
UPDATE the name of the procedure Reverse Rhinopodoplasty to Forward Rhinopodoplasty II(4 rows)
UPDATE the physician Elliot Reid to Elliot Dudemeister(4 rows)
UPDATE the cost of the Follicular Demiectomy procedure to $100(6 rows)
UPDATE all rooms on the 4th floor (4xx) to NULL (10 rows)
2b. You will notice for some records in your hospital_basic table there is a NULL value for the Assisting Nurse. The NULL value represents Nurse Thomas Jones: A Nurse who was mistakenly deleted from the database. UPDATE the hospital_basic table so the NULL values are replaced with Thomas Jones.
DELETE the following data.
DELETE all records from thehospital_basic database where the patient was Albert Coffey (3 rows)
DELETE all records from thehospital_basic database where the address contains the keyword Street(21 rows)
DELETE all records from the hospital_basic database where the patients phone number ends in 1 and the cost is less than 3000(3 rows)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Iv Special Issue On Database Systems For Biomedical Applications Lncs 6990

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Christian Bohm ,Johann Eder ,Claudia Plant

2011th Edition

3642237398, 978-3642237393

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago