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 6382365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:30:47+00:00 2026-05-25T02:30:47+00:00

Below is a table. stu_id meet_doc_id doc_name stu_name dob value date 101 0104 AD

  • 0

Below is a table.

 stu_id   meet_doc_id   doc_name   stu_name       dob           value      date
    101        0104          AD          AM      15/06/1950     LMDO     2011-02-15
    101        0105          AD          AM      15/06/1950     CLEAR    2011-02-18
    101        0106          AD          AM      15/06/1950     CLEAR    2011-02-25
    102        0107          AD          AK      12/08/1987     CLEAR    2011-03-28
    102        0108          AD          AK      12/08/1987     LDMO     2011-04-29
    103        0109          PK          LMP     13/07/1970     CLEAR    2011-03-28
    103        0110          PK          LMP     13/07/1970     CLEAR    2011-05-12

What will be the resulting query if I expect to see a result set of

  stu_id    meet_doc_id   doc_name   stu_name      dob          value      date
    101        0104          AD          AM      15/06/1950     LMDO     2011-02-15
    102        0107          AD          AK      12/08/1987     CLEAR    2011-03-28
    103        0110          PK          LMP     13/07/1970     CLEAR    2011-05-12
  • 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-25T02:30:48+00:00Added an answer on May 25, 2026 at 2:30 am

    Your table looks extremely un-normalised with lots of repeating groups but I think you need

    ;WITH CTE
         AS (SELECT stu_id,
                    meet_doc_id,
                    doc_name,
                    stu_name,
                    dob,
                    value,
                    date,
                    ROW_NUMBER () OVER (PARTITION BY stu_id ORDER BY meet_doc_id) AS
                    RN
             FROM   YourTable)
    select stu_id,
           meet_doc_id,
           doc_name,
           stu_name,
           dob,
           value,
           date
    FROM   CTE
    WHERE  RN = 1  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the below table ID Data Date 1 A 7/19/2011 1 A 6/12/2011 2
I have a table as below Name Priority Date ------------------------- A 2 d1 B
I need to update below table so that value in column 3 vould be
How to query for rank over 'value' for each day in the below table?
I want to select patient_id and date difference from below table: p_id TreatmentDate 15
Is it possible to get the result as below from the same table date-wise
The table below works well. However, I am trying to pass $row[username] along as
In the table below, the entire cells are hyperlinks. How can I make just
Would following the table below be the best way of determining the access type
i have the table below <tr id=group_1>...</tr> <tr id=el>...</tr> <tr id=el>...<tr> <tr id=group_2></tr> <tr

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.