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
Declaring Exceptions The Exceptions can be declared only in the declarative part of the PL/SQL subprogram, block, or package. By introducing its name, you can declare an excep

What are 3 good practices of modeling and/or implementing data warehouses?

On occasion, some of Brewbean's customers mistakenly leave an item out of a basket already checked out, so they create a new basket containing the missing items. However, they requ

Using Subqueries A subquery is a query (typically enclosed by parentheses) that appears within another SQL data manipulation statement. If evaluated, the subquery gives a va

OUT Mode An OUT parameter returns values to the caller of a subprogram. Within the subprogram, an OUT parameter act like a variable. That means that you can use an OUT formal

what is the use of declare keyword

Parameter and Keyword Description: type_name: This identifies a user-defined type specifier that is used in the subsequent declarations of the objects. AUTHID Clause:

Parameter and Keyword Description: procedure_name The user-defined procedure is declared by this construct. parameter_name: This identifies the formal parameter t

Advantages of Invoker Rights The Invoker-rights routines centralize the data retrieval. They are particularly helpful in applications which store data in various schemas. In su

Procedural Constraint Enforcement (Triggers) SQL has an alternative method of addressing database integrity, involving event-driven procedural code. The special procedures th