You will need to refer to the Hospital database to answer this question. Write S
ID: 3829565 • Letter: Y
Question
You will need to refer to the Hospital database to answer this question. Write SQL queries to perform the following operations. In each case show the SQL statement you used and the actual output from your DBMS. You are required to show the actual output of your queries.
a) List drug details for all antibiotics with a price greater than 1.0.
b) List the team code and the names and positions of all members of team t29.
c) For each ward, list the ward number and its occupancy (= the actual number of patients in the ward).
d) List the name of every nurse along with the name of her supervisor ordered by nurse name.
e) get all the details of any doctor who does not provide any treatments.
f) Write a query to get for each drug type, the type and the number of drugs in the type in the database, ordered alphabetically by the drug type.
g) Write a query to get the details of all drugs whose price is above the average price of all drugs of the same type.
h) Write a query to retrieve the ward number and maximum height of patients for all wards having less than 6 patients, excluding wards w3, w5 and w7.
File: https://drive.google.com/file/d/0B4Vam3R7Y1AqS21iOVlIZnotWG8/view?usp=sharing
Explanation / Answer
files are not opening.but based on the input i am writting the query.
use Hospitaldb;
a) Select drug_name from table_name where price > 1.0
b)select team_code,name,position from table_name where team = "t29"
c)need to look at the table structure for accurate answer.
d)select nurse_name,supervisor_name from table_name order by nurse_name
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.