0% found this document useful (0 votes)
72 views6 pages

Data Integrity: Test Table Result Field

The document discusses data integrity for test and hospital tables. It provides sample SQL queries to retrieve patient, doctor, and hospital information from various tables based on criteria like location, age, number of virus tests, and more. Contact information is also included at the end.

Uploaded by

Subrat Dash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views6 pages

Data Integrity: Test Table Result Field

The document discusses data integrity for test and hospital tables. It provides sample SQL queries to retrieve patient, doctor, and hospital information from various tables based on criteria like location, age, number of virus tests, and more. Contact information is also included at the end.

Uploaded by

Subrat Dash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Data Integrity:

Test Table Result Field:

Hospital Table NoOfMachine Field:


Treatment description in the treatment table

Primary key testID must be consisted of a letter ‘T’ (or ‘t’)


Table with Sample Data

Contact:
Question 1. List the full names, phones, and ages for these patients whose home addresses are
either in Brisbane or Gold Coast, and their ages are greater than 60 years old. Order by their family
names.
SELECT PATIENT.FULLNAME, PHONENO AS Expr1, AGE AS Expr2
FROM PATIENT
WHERE (((PATIENT.[ADDRESS])="BRISBANE")) OR (((PATIENT.
[ADDRESS])="GOLDCOAST") AND (([AGE])>=60))
ORDER BY PATIENT.FULLNAME;
Question 2. There are many doctors in each hospital. But not every doctor participates in the
treatment work due to their different specialties and other tasks. List the names and specialties of
doctors, who are working at Princess Alexandra Hospital in Brisbane and have not participated in
the treatment work of corona virus-infected patients.

SELECT NAMES FROM DOCTOR WHERE HOSPITAL.NAME="Princes Alexandra" AND


ADDRESS="BRISBANE";

Question 3. List details of the patients from Rockhampton and their closely contacted persons.
These details include patient’s full names and phones, closely contacted person’s full names and
phones, as well as the contact process or scenario descriptions.
SELECT CLOSELYCONTACTPERSON.FullName,PATIENT.FULLNAME,PATIENT.PHONE
FROM PATIENT WHERE ADDRESS="Rockhampton"

Question 4. List the names, phones, and the number of virus tests for the patients who are from
Brisbane.
SELECT FULLNAME,PHONE FROM PATIENT WHERE ADDRESS="Brisbane"
Question 5. Which hospitals have the highest number of respiratory machines? Find out the names
of the hospitals, their phones, and the number of respiratory machines.
SELECT MAX(NumberOfMachine),NAME,CONTACTNO FROM HOSPITAL

Question 6. Which patients have been tested more than once on virus test? Show the patient
names, phones, and the number of virus tests.

SELECT FULLNAME,PHONE,COTEST FROM PATIENT WHERE COTEST>1

REPORT

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy