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

  • Home
  • SEARCH
  • 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 8550373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:56:08+00:00 2026-06-11T13:56:08+00:00

Below is the table data (a small piece) basically I’m looking to query just

  • 0

Below is the table data (a small piece) basically I’m looking to query just the rows with the minimum original_date_ctr when grouped by the accoutn number.

I’ve tried using HAVING(MIN()), and where = Min() and other ways with no luck.

The correct result here would give me id_ctr 688, 1204 and 1209

id_ctr  account_number_cus  original_date_ctr   mrc_ctr  
------  ------------------  -----------------  ----------
   688               20062  2008-05-17             138.97
  1204              151604  2006-08-10           42000.00
  1209              151609  2006-06-29             968.68
  1367               20062  2011-10-27             207.88
  1434              151609  2009-09-10            1469.62
  1524              151604  2009-09-01           36999.99
  1585              151609  2012-05-31            1683.88
  • 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-11T13:56:10+00:00Added an answer on June 11, 2026 at 1:56 pm

    You can do this the following way:

    select t1.id_ctr,
        t1.account_number_cus,
        t1.original_date_ctr,
        t1.mrc_ctr  
    from yourtable t1
    inner join
    (
        select min(original_date_ctr) as mindate, account_number_cus
        from yourtable
        group by account_number_cus
    ) t2
        on t1.account_number_cus = t2.account_number_cus
        and t1.original_date_ctr = t2.mindate
    

    see SQL Fiddle with Demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a piece of matlab code below which reads data from a table.
i have used below linq query to join some table to get accurate data..
Take the tsql query below: DECLARE @table TABLE(data VARCHAR(20)) INSERT INTO @table VALUES ('not
Im having a table with notes. Below is a small sample of data of
I do have a table data as shown below: <td> <label for=title>Title : </label>
I have a table that has data like below(sorted by date) COL_A | COL_B
I have a table part with a few demo data as below in Oracle
I have sales table data as shown below Sales Table Data http://lh5.ggpht.com/_KT7tmVVBHFM/TCryAax1JlI/AAAAAAAAAFk/zahMq4RoOuw/s144/Sales.png I want
Updates : Please see below i have table: data +-----------------------+--------------+-----------+ | State | d_country
I have data in data table like below. I am trying to make graph

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.