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
Write SQL queries to solve the following specifications. Include the query AND THE OUTPUT.  A screen dump of the output is acceptable. Show as many rows as you can. A screen dump i

Use the MASCOT tables CREDITRS, PORDS and PAYMENTS to write SQL queries to solve the following business problems. These tables / data are available to you via the USQ Oracle server

Block Structure The PL/SQL is a block-structured language. That is, the fundamental units (procedures, anonymous blocks, and functions) that make up a PL/SQL program are logi

Raise_application_error -  procedure of package DBMS_STANDARD , allows to issue an user_defined error messages by stored sub-program or database trigger.

Declaring and Initializing Objects: An object type is once defined and installed in the schema; you can use it to declare the objects in any PL/SQL, subprogram, block or packa

Use Bulk Binds If SQL statements execute inside a loop using the collection elements as bind variables, context switching between the PL/SQL & SQL engines can slow down the ex

Define basic operators of relational algebra with an example each

SQL Cursor   The Oracle implicitly opens a cursor to process each SQL statement not related with an explicit cursor. The PL/SQL refers to the most current implicit cursor as t

Seeking a programmer to design a legal document with pre-existing fields that could allow the auto-population of client(s) information (i.e. Name, Account Number, Address etc.) int

GOTO Statement   The GOTO statement branches categorically to a block label or statement label. The label should be exclusive within its scope and should precede a PL/SQL bloc