TAsk: select AccessionNumber, Accession.PatientID, Patient.PatientName, breed_type.BreedType, breed_type.Breed from Accession inner join Patient on Accession.PatientID=Patient.PatientID inner join...


TAsk:


select AccessionNumber, Accession.PatientID, Patient.PatientName, breed_type.BreedType, breed_type.Breed
from Accession inner join Patient on Accession.PatientID=Patient.PatientID
inner join breed_type on Patient.breed_type_id=breed_type.breed_type_id
where Transferred=''
order by breed_type.BreedType;


/* Query 2.a.i */



Select CouncilName, count(*) as total, AdmittedDateTime  from Accession group by CouncilName
having month(AdmittedDateTime)=5;


/* Query 2.a.ii */




Select CauseOfAffliction, count(*) as total, AdmittedDateTime  from Accession inner join Causes_Of_Affliction
on Accession.CauseOfAfflictionid=Causes_Of_Affliction.id
group by CauseOfAffliction
having month(AdmittedDateTime)=5;


/* Query 2.b */


select count(*) 'TotalAccessions' from Accession where month(AdmittedDateTime)=6 and year(AdmittedDateTime)
/* Query 3 */


Select * from CarerGroups where ExpiryDate





Oct 07, 2019
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here