Using the diagram, Please create a SQL STATEMENT with the statement below. 1. Th
ID: 3826248 • Letter: U
Question
Using the diagram, Please create a SQL STATEMENT with the statement below.
1. The license applications that have supporting documents which have been reviewed and approved but are currently pending final approval.
Professional CE Provider Provider FirstName First Name Provider LastName Last Name submits Gende Starte Date Address Main Phone Number obtains Application Enrollment qualifies ApplicationID Enrollment ID SSN enrol Enrollment StatusID License ID Type Code Renew License ID Numbe Submission Date has Section ID has Decision Date Term Qualification has SSN QualificationID ApplicationID Type License Qua cation has License eID Name Section equines equines SectionID nstructorID has License ProviderID CECourselD cation has cation eID ua ua cense Section Number License Type Degree Type SSN Term School Issue Date License Type ID Room Number Graduation Date Expiration Date Decision Date Approved BylD Expiration Date ApplicationID Document ID Document ID Title Submission Date Qual cationType Review BylD ApplicantFirst Name cation eID ua ApplicantLast Name Qua cation Name Document Description Received From Rece Qua ReviewID ApprovalDate Document Status DenialDate has ployment oyment FEIN Employment Division has nstructo nstructorID SSN nstructorStartDate has CE Course Ecourse FEIN Qual cation TypeID Course Number Course Name Course Hour hasExplanation / Answer
Here is your SQL query. I was not able to run it as I dont have the db access. Just created from the data above.
Assumptions: - DocumentStatus is attribute of DocumentID. Document has only relationship with Applications with ApplicantfirstName and ApplicantLastName. Final Approval is not there So assuming ApprovedByID will be null.
Select L.LicenseID from License L
INNER JOIN APPLICATION A ON A.SSN = L.SSN
INNER JOIN Professional P ON A.SSN = P.SSN
INNER JOIN DocumentID D ON P.FirstName = D.ApplicantFirstName
AND P.LastName = D.ApplicantLastName
WHERE D.DocumentStatus = "Approved"
AND D.DocumentStatus = "Reviewed"
AND L.ApprovedID is null
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.