Sql query on hospital database, PL-SQL Programming

Perform the following queries on the Hospital1.DB using SQL Anywhere (START EARLY!).

a. Which patients have purchased the drug "Tylenol"? List the names and addresses. Arrange them in descending order of patient name.

b. List the physician names and the number of visits supervised by each physician. Arrange them in descending order of number of visits.

c. List the Phy# and names of all physicians whose name starts with the letter "M."

d. List the names, addresses and phone#s of patients living in Fremont or San Jose. Arrange them in ascending order of the zip.

e. List the Drug# and description of drugs that have not been prescribed. Arrange them in ascending order of description.

f. How many patients are there in the database? Give the count.

g. List Visit#, PatID, Phy#, Drug#, Qnty and Amount. Calculate Amount as Price*Qnty.

Posted Date: 3/12/2013 2:41:37 AM | Location : United States







Related Discussions:- Sql query on hospital database, Assignment Help, Ask Question on Sql query on hospital database, Get Answer, Expert's Help, Sql query on hospital database Discussions

Write discussion on Sql query on hospital database
Your posts are moderated
Related Questions
Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

Redeclaring Predefined Exceptions Keep in mind that, the PL/SQL declares predefined exceptions globally in the package STANDARD; Therefore you need not declare them yourself.

GOTO Statement The GOTO statement branches to a label unconditionally. The label must be exclusive within its scope and should precede an executable statement or a PL/SQL block.

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T

Bulk Binds advantages In the Embedded Oracle RDBMS, the PL/SQL engines accept any valid PL/SQL subprogram or block. As the figure shows, the PL/SQL engine executes all procedur

UNION without CORRESPONDING - SQL The use of UNION without CORRESPONDING. Example is merely by omitting CORRESPONDING, but only because the operands have identical SELECT clau

Task 2 [12 marks] Write the package body for the following package specification (the detailed description of each function and procedure is provided in the appendix below). Place

Recursion versus Iteration Dissimilar the iteration, recursion is not crucial to PL/SQL programming. Any problem which can be solved using recursion can be solving using the it

Advantages of Packages The benefits of the Packages are as shown below: Modularity The Packages encapsulate logically associated items, types, and subprograms in the