Assignment 6 IT-520 - PainLevel > '0' ; Case...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sophia Wilkes IT 520 Assignment 6 Case Exercise Page 400 1 a. Provide the query and its output. a. Select information from two or more tables (e.g., all the details of all the visits of a patient, etc.). QUERY: Select LastName , FirstName , VisitDate , VisitReason From Patient Inner Join Visit On Patient . PatientNo = Visit . PatientNo Where Patient . PatientNo = '9844'
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Case Exercise Page 400 1 b. Provide the query and its output. b. Use sub query syntax (e.g., a listing of all the patients who reported pain that exceeded the average pain for all visits). QUERY: select AVG ( PainLevel ) As Average from Visit Select Patient . PatientNo , Patient . LastName + ', ' + Patient . FirstName AS PatientName , Visit . PainLevel From Patient , Visit Where Patient . PatientNo = Visit . PatientNo AND
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PainLevel > '0' ; Case Exercise Page 400 1 c. Provide the query and its output. b. Return a result table that could be used to produce a report, sorted by patient name or date, for a particular week or after a particular date, or a listing of patient visits for patients assigned to a specific social worker. QUERY: Select Patient . PatientNo , Patient . FirstName + ' ' + Patient . LastName AS Name , Patient . FirstSeen , Patient . SocialWorker , Visit . VisitDate , Visit . VisitTime , Visit . VisitReason AS ReasonForVisit , Visit . NewSymptoms , Visit . PainLevel AS LevelOfPain From Patient Inner Join Visit On Patient . PatientNo = Visit . PatientNo...
View Full Document

Page1 / 3

Assignment 6 IT-520 - PainLevel > '0' ; Case...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online