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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:52:20+00:00 2026-05-25T09:52:20+00:00

i have a table that contain s.no Id and Amount and accCode . s.no————-id————–Amount——–accCode

  • 0

i have a table that contain s.no Id and Amount and accCode.

  s.no-------------id--------------Amount--------accCode
   1----------------2---------------20-------------2.1
   2----------------1---------------30-------------2.1
   3--------------- 5---------------20-------------3.1
   4----------------1---------------30-------------2.1
   5----------------3---------------40-------------3.1
   6----------------2---------------20-------------2.1

i need all the record that have a common Amount and accCode and id. In this case i need to show the data of S.NO 2 and 4, and also 1 and 6 as they have similar value. If Possible it would be better the similar data come orderly. Is this one possible through Sql? Please give some hints i am stuck with this one.thaks in advance.

  • 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-25T09:52:21+00:00Added an answer on May 25, 2026 at 9:52 am

    One solution could be, assuming that your table is named “test”

    select t1.*, t2.[s.no] as MatchSNo from test t1, test t2
    where t1.id = t2.id and t1.amount = t2.amount
    and t1.acccode = t2.acccode and t1.[s.no] <> t2.[s.no]
    order by t1.id, t1.Amount, t1.accCode, [s.no]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to develop a table that would contain distance between destinations and need
I have a table called orders this table contains all the information we need.
Suppose I have a table that contain information on streaming media connections. In this
I have table that contain date and time field. id|date|time ========= 1|01/01/2001|10:45 2|01/02/2002|11:45 3|01/03/2003|12:45
I have a table that contains all the data about users . Users can
I have a table that contains common entries in two columns. For Example: Column1
I have a table that contains a record of prioritys that links to another
I have this table that I would like to select values from. The thing
I have an accounting table that contains a dollar amount field. I want to
I have a table that contains multiple dropdown menus for a list of profile

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.