Need sql query/stored procedure fix
- or -
Post a project like this1999
$100
- Posted:
- Proposals: 2
- Remote
- #2173503
- Awarded
Description
Experience Level: Entry
Hello,
I have a query that returns the following results as an example. In the result set, there are multiple rows of the Recommendation document type, and since it is a recommendation, there is a recommendation type. There are two 'Extracurricular' recommendations but I want only the most recently indexed recommendation to be returned, based on the Index Date.
The same behavior should apply to any of the document types since there could be multiple rows of the same document type and I need only the most recently indexed document id for each document type.
There are more document types than listed in the examples, and document types for recommendation and transcript will need to check the recommendation type and transcript type.
DEADLINE: MONDAY 5AM, US Eastern time.
Document Type Student ID Indexed Date DOCUMENT_ID Transcript Type Recommendation Type
Standardized Test Scores 0901954 2018-02-05 10:58:46.870 8287ff15126fa5e10jb7tbdq90010000 NULL NULL
Recommendation 0901954 2018-02-05 10:58:46.067 8287ff15126fa5e10jb9sae780010000 NULL MATH
Recommendation 0901954 2018-02-05 10:58:45.150 8287ff15126fa5e10jb9s0imi0010000 NULL PRINCIPAL OR COUNSELOR
Recommendation 0901954 2018-02-05 10:58:44.330 8287ff15126fa5e10jb9o0io70010000 NULL EXTRACURRICULAR
Recommendation 0901954 2018-02-05 10:58:43.473 8287ff15126fa5e10jb7se14r0010000 NULL EXTRACURRICULAR
Application 0901954 2018-02-05 10:58:42.677 8287ff15126fa5e10jb7s85rp0010000 NULL NULL
Parent Statement 0901954 2018-02-05 10:58:41.967 8287ff15126fa5e10j96q0wwd0010000 NULL NULL
I have a query that returns the following results as an example. In the result set, there are multiple rows of the Recommendation document type, and since it is a recommendation, there is a recommendation type. There are two 'Extracurricular' recommendations but I want only the most recently indexed recommendation to be returned, based on the Index Date.
The same behavior should apply to any of the document types since there could be multiple rows of the same document type and I need only the most recently indexed document id for each document type.
There are more document types than listed in the examples, and document types for recommendation and transcript will need to check the recommendation type and transcript type.
DEADLINE: MONDAY 5AM, US Eastern time.
Document Type Student ID Indexed Date DOCUMENT_ID Transcript Type Recommendation Type
Standardized Test Scores 0901954 2018-02-05 10:58:46.870 8287ff15126fa5e10jb7tbdq90010000 NULL NULL
Recommendation 0901954 2018-02-05 10:58:46.067 8287ff15126fa5e10jb9sae780010000 NULL MATH
Recommendation 0901954 2018-02-05 10:58:45.150 8287ff15126fa5e10jb9s0imi0010000 NULL PRINCIPAL OR COUNSELOR
Recommendation 0901954 2018-02-05 10:58:44.330 8287ff15126fa5e10jb9o0io70010000 NULL EXTRACURRICULAR
Recommendation 0901954 2018-02-05 10:58:43.473 8287ff15126fa5e10jb7se14r0010000 NULL EXTRACURRICULAR
Application 0901954 2018-02-05 10:58:42.677 8287ff15126fa5e10jb7s85rp0010000 NULL NULL
Parent Statement 0901954 2018-02-05 10:58:41.967 8287ff15126fa5e10j96q0wwd0010000 NULL NULL
Jules L.
100% (52)Projects Completed
38
Freelancers worked with
37
Projects awarded
52%
Last project
21 Jan 2020
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies