Sql query on hospital database, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Sql query on hospital database

Functions in pl/sql, Functions   The function is a subprogram that cal...

Functions   The function is a subprogram that calculates a value. The Functions and procedures are structured similar, except that the functions have a RETURN clause. You can

Forall statement - syntax, FORALL Statement The FORALL statements instr...

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

Implicit cursor attributes, Implicit Cursor Attributes The Implicit cur...

Implicit Cursor Attributes The Implicit cursor attributes returns the information about the execution of an INSERT, DELETE, UPDATE, or SELECT INTO statement. The cursor attribu

Sql script to create and populate the tables, Create the four tables and po...

Create the four tables and populate them with the given data. Answer the following queries in SQL. 1. Get all part-color/part-city combinations. Note: Here and subsequently, the

Oracle, Literature review

Literature review

Keyword & parameter description - expressions, Keyword & Parameter Descript...

Keyword & Parameter Description: boolean_expression: This is an expression which yields the Boolean value that is TRUE, FALSE, & NULL. character_expression: This

Primary key, PRIMARY KEY: PRIMARY KEY  indicates that the table is sub...

PRIMARY KEY: PRIMARY KEY  indicates that the table is subject to a key constraint, in this case declaring that no two rows in the table assigned to ENROLMENT can ever have the

Null statement-sequential control, NULL Statement The NULL statement c...

NULL Statement The NULL statement clearly specifies in action; it does nothing other than to pass control to the next statement. It can, though, improve the readability. In a

Example of delete - sql, Example of DELETE - SQL As with UPDATE, a FOR...

Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Example of shorthand for a row constraint - sql, Example of Shorthand for a...

Example of Shorthand for a row constraint Example: Shorthand for a row constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Mark_in_range CHECK (Mark BETWEEN 0 AND 100);

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd