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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:07:41+00:00 2026-05-25T21:07:41+00:00

Referring to the diagram below the records table has unique Records. Each record is

  • 0

Referring to the diagram below the records table has unique Records. Each record is updated, via comments through an Update Table. When I join the two I get lots of duplicates.

  1. How to remove duplicates? Group By does not work for me as I have more than 10 fields in select query and some of them are functions.

  2. Write a sub query which pulls the last updates in the Update table for each record that is updated in a particular month. Joining with this sub query will solve my problem.

Thanks!

Edit
Table structure that is of interest is

create table Records(
recordID int,
90more_fields various
)

create table Updates(
update_id int,
record_id int,
comment text,
byUser varchar(25),
datecreate datetime
)

enter image description here

  • 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-25T21:07:42+00:00Added an answer on May 25, 2026 at 9:07 pm

    Here’s one way.

    SELECT * /*But list columns explicitly*/
    FROM   Orange o
           CROSS APPLY (SELECT TOP 1 *
                        FROM   Blue b
                        WHERE  b.datecreate >= '20110901'
                               AND b.datecreate < '20111001'
                               AND o.RecordID = b.Record_ID2
                        ORDER  BY b.datecreate  DESC) b 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

referring at the diagram below: http://developer.android.com/guide/components/fragments.html Could someone please please explain why Google suggests
Referring to this question: How to subtract dates from each other In Groovy, I've
Referring to screenshot 1 below, I would like to create an image viewer circled
Referring to How to execute an Oracle stored procedure via a database link ,
I am referring to http://www.if-not-true-then-false.com/2009/11/howto-create-postgresql-table-partitioning-part-1/ To reproduce the problem, here is some simple steps
Selecting constants without referring to a table is perfectly legal in an SQL statement:
referring to the code below.. I got a class LocationService and have a variable
Referring to this post on primefaces forum. Has someone got any idea how can
Referring to the code below, is there a way to bind the test 2
Referring to below screenshot, ListView consists of 3 TextView . Depending on the value

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.