Results 1 to 2 of 2
  1. #1
    EDOE&SEATD is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2014
    Posts
    1

    Multiple columns query having distinct values in one column

    I am working in a database that has three tables
    1. Candidates (CandidateID, Name, Marks)
    2. Schools (SchoolID, School Name, VacantPosts)
    3. CandidatesFor (SchoolID, CandidateID)

    Candidates table contains the data of persons who have applied for a vacant post in the schools. Schools table contains the data of schools along with number of vacant posts.
    CandidatesFor table has two fields “SchoolID” and “CandidateID”. One Candidate may be linked with at most five schools. (i.e. one candidate may have applied in five schools for recruitment)


    I want to pick unique candidate for each school that has maximum marks. Can you help me in this problem?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-28-2013, 11:10 PM
  2. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  3. Sql code for Distinct column and two other Columns
    By vaiofoxx1 in forum Programming
    Replies: 3
    Last Post: 03-22-2012, 09:24 AM
  4. Replies: 2
    Last Post: 12-05-2011, 04:53 AM
  5. Replies: 2
    Last Post: 11-18-2009, 06:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums