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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:48:14+00:00 2026-06-16T21:48:14+00:00

I have some data which i want to parse and then based on that,

  • 0

I have some data which i want to parse and then based on that, i have to take the data for the date which is minimun for each group.

Data files is as below ( a small sinppet)

D_REPDATE;INDEX;MATLABEL;ST_START;ST_END;QT_START;QT_END;PRC_RF0;PRC_RF1
APR-13;04/01/13;F35MEDFC;APR-13;01/04/13;30/04/13;01/04/11;29/03/13;596.02000;596.02000
APR-14;04/01/13;F35MEDFC;APR-14;01/04/14;30/04/14;30/03/12;31/03/14;581.77000;581.77000
APR-15;04/01/13;F35MEDFC;APR-15;01/04/15;30/04/15;01/04/13;31/03/15;567.27000;567.27000
APR-16;04/01/13;F35MEDFC;APR-16;01/04/16;30/04/16;01/04/14;31/03/16;556.52000;556.52000
APR-17;04/01/13;F35MEDFC;APR-17;01/04/17;30/04/17;01/04/15;31/03/17;548.77000;548.77000
APR-13;04/01/13;BR DATED;APR-13;01/04/13;30/04/13;01/04/11;29/03/13;108.46000;108.46000
APR-14;04/01/13;BR DATED;APR-14;01/04/14;30/04/14;30/03/12;31/03/14;102.53000;102.53000
APR-15;04/01/13;BR DATED;APR-15;01/04/15;30/04/15;01/04/13;31/03/15;98.19000;98.19000
APR-16;04/01/13;BR DATED;APR-16;01/04/16;30/04/16;01/04/14;31/03/16;94.49000;94.49000
JAN-21;04/01/13;F630GCW;JAN-21;01/01/21;31/01/21;01/01/19;31/12/20;85.57000;85.57000
JUL-13;04/01/13;F630GCW;JUL-13;01/07/13;31/07/13;01/07/11;28/06/13;93.50000;93.50000
JUL-14;04/01/13;F630GCW;JUL-14;01/07/14;31/07/14;29/06/12;30/06/14;90.95000;90.95000
JUL-15;04/01/13;F630GCW;JUL-15;01/07/15;31/07/15;01/07/13;30/06/15;88.83000;88.83000
JUL-16;04/01/13;F630GCW;JUL-16;01/07/16;31/07/16;01/07/14;30/06/16;87.01000;87.01000

For each index for the min QT_END i want to read the PRC_RF0.

I have written something like

class GMRTest    
{
    public string CRVLABEL;
    public string INDEX;
    public string MATLABEL;
    public DateTime ST_START;
    public DateTime ST_END;
    public DateTime QT_START;
    public DateTime QT_END;
    public string PRC_RF0;
    public string PRC_RF1;
}

and reading this method into a list (listData)

listData.GroupBy(s => s.INDEX).Select( aa => new {Key = aa.Key, Data = aa.OrderBy(ab => ab.ST_START) } );

However this is still giveing me all the data, what i want is the data with the min date (ST_START).

Any help is appreciated.

Thanks

  • 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-06-16T21:48:14+00:00Added an answer on June 16, 2026 at 9:48 pm

    Try to append First() after your OrderBy call. Example:

    var result = listData.
        GroupBy(s => s.INDEX).
        Select(group => new {Key = group.Key, Data = group.
            OrderBy(ab => ab.ST_START).
            First()});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some MET data I want to validate which would look something like
I have a stack which contains some integer data. I want to find out
I have some data which look like that: PMID- 19587274 OWN - NLM DP
I have some data that I want to store somewhere in my Rails app
I have some data which (quite reasonably) uses null and false for different meanings.
I have some data which i need to make some statistics. I need to
I have some data (which users input using WYSIWYG editor). I have created a
I have some data which I run through, which generates a textfile. The data
im new to regular expressions in php. I have some data in which some
I have some data from a external party which is encrypted according to them

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.