Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4600854
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:44:35+00:00 2026-05-21T23:44:35+00:00

The goal is to return the info from the latest assignment for each ‘eligibility’.

  • 0

The goal is to return the info from the latest assignment for each ‘eligibility’. If there are two assignments with the same date, still only return one row per ‘eligibility’ with the assignment picked being arbitrary.

Current method:

qCurrentAssignment_sub:

SELECT tblAssignment.EligibilityID, Max(DateAdd("s",[AssignmentID] Mod 10000,[AssignmentDate])) AS DatePlusIDMod10000
FROM tblAssignment
GROUP BY tblAssignment.EligibilityID;

qCurrentAssignment:

SELECT tblAssignment.AssignedTo, tblAssignment.AssignedBy, tblAssignment.Method, tblAssignment.AssignmentDate
FROM qCurrentAssignment_sub INNER JOIN tblAssignment ON 
    (qCurrentAssignment_sub.EligibilityID = tblAssignment.EligibilityID) AND 
    (qCurrentAssignment_sub.DatePlusIDMod10000 = DateAdd("s",[AssignmentID] Mod 10000,[AssignmentDate]));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:44:36+00:00Added an answer on May 21, 2026 at 11:44 pm

    Updated From Comment

    If given

    • multiple assignmentid for each assignmentid
    • you want the assignmentid associated with the max assignmentDate
    • If more than one assignmentid exist for the max(assignmentDate) then you want the max assignmentid

    Change qCurrentAssignment_sub to

    qCurrentAssignment_sub

      SELECT
            eligibilityid,
            MAX(assignmentid) assignmentid
    
        FROM
            tblassignment 
            INNER JOIN 
            (SELECT tblassignment.eligibilityid, 
                   MAX(AssignmentDate) AssignmentDate 
            FROM   tblassignment 
            GROUP  BY tblassignment.eligibilityid) maxAssignmentDate
            ON tblassignment.eligibilityid = maxAssignmentDate.eligibilityid
               and maxAssignmentDate.AssignmentDate = maxAssignmentDate.AssignmentDate
        GROUP BY 
            eligibilityid
    

    Then join back to tblassignment on assignmentid. This makes the join a little cleaner as well

    qCurrentAssignment

    SELECT tblassignment.assignedto, 
           tblassignment.assignedby, 
           tblassignment.method, 
           tblassignment.assignmentdate 
    FROM   tblassignment 
           INNER JOIN qcurrentassignment_sub 
             ON tblassignment.assignmentid = qcurrentassignment_sub.assignmentid 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to return a start and end date having same value in
My goal is to parse a class and return a data-structure (object, dictionary, etc)
Goal: create webservice that will query database and return rows, then pass it to
Here is a JavaScript example from Eloquent JavaScript : function findSequence(goal) { function find(start,
I saw the following example disccussed here previously, where the goal was to return
I saw the following example on Nabble , where the goal was to return
Goal: Retrieve data aaa from the first td in tr by pressing the link
My class relationship: ClassMaster 1----* ClassSessions My Goal: Return all ClassMasters that have ClassSessions
I'm implementing the A* search algorithm from this pseudo on wikipedia's article: function A*(start,goal)
Goal: When you click the text info in the column comments, a row should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.