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
Subprograms The PL/SQL has two types of subprograms known as the procedures and functions that can take parameters and be invoked. As the following example represents, a subp

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is


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.

SQL Functions The PL/SQL uses all the SQL functions involving the following aggregate functions that summarize the whole columns of the Oracle data: GROUPING, AVG, COUNT, STDDE

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr

FORALL Statement The FORALL statements instruct the PL/SQL engine to bulk-bind the input collections before sending them to the SQL engine. Though the FORALL statement consists

Using FOR UPDATE If you declare a cursor which will be referenced in the CURRENT OF clause of an UPDATE or DELETE statement, you should use the FOR UPDATE clause to obtain an

Using Operator VALUE: As you may expect, the operator VALUE returns the value of an object. The VALUE takes its argument a correlation variable.  For illustration, to return a

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I