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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:26:22+00:00 2026-05-16T23:26:22+00:00

In the database there are column values which appear in multiple rows. The example

  • 0

In the database there are column values which appear in multiple rows. The example rows are the following (in csv format):

    AFAB19476C2CEEEE101FFA45FD207BA8B6185B29,539EE0643AFC3A3BE3D20DC6BE7D5376DC536D34,9800,58,29,24,34,2
A801DA9B2F4116A7A1B14A13532B2177C7436C43,91850E4C50536D45C9CEAFE5FB5B3A87154EB754,9800,15,15,15,15,1
4C1E0B5387FB7FE19FC1ED682D0EB08249779180,9B17AE806C79437945F99C054B59A859D5639D11,9800,51,51,51,51,1
5B83A4BE4161497C62471BF133A4E1AD905D25F8,BFF4CED4F54F221A76714B311623398070847B26,9800,71,71,71,71,1
145145E49302ABBEEFF2797CAA8E122FFD3D5BFD,0C287F08E8E11DB4CF10CEB5801EBD61E7664FE4,9800,55,55,55,55,1
99C1F96461BC870574D002034F001BA3F96A9AB5,2EC4F3158764DC07D981008B3054B97809A0B048,Tujina,34,34,34,34,1
**CCB433630C735A8DA1B7828C10820B8CF91F25B9**,2C9C297BEF9CC1C0CF16A0559DE828FA0E226698,9817,339,169,137,202,2
BF2A7F0A9AD762B46A4423F76BF0479B9A72F163,336FB392EA4EF85EFE2563332CDE7D32FCE711B2,9800,34,34,34,34,1
...
**CCB433630C735A8DA1B7828C10820B8CF91F25B9**,C4015FE337F1EEFA1ECE4143D77F9627BEB9D358,9800,464,464,464,464,1
**CCB433630C735A8DA1B7828C10820B8CF91F25B9**,0EC08D78C637EF0A05E858B2BAC85C3EF05DF959,9800,73,73,73,73,1

In this example the value CCB433630C735A8DA1B7828C10820B8CF91F25B9 appears in three rows in combination with different values.

I am looking for a way to count in how many rows the value from the 1st column appears and then order the values by the number of rows that contain that value.

For example only the value from the first row was checked the query would be the following

SELECT COUNT (*) FROM records WHERE column_1 = 'AFAB19476C2CEEEE101FFA45FD207BA8B6185B29'

but instead of just first row the values from all rows have to be checked.

I would be very thankful if anyone of you could suggest an appropriate SQL query statement or a function to sort all the values from the first column by the number of repeatings.

Thank you!

  • 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-16T23:26:23+00:00Added an answer on May 16, 2026 at 11:26 pm
    SELECT column_1, COUNT(*)
    FROM records
    GROUP BY column_1
    ORDER BY COUNT(*) DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a column in database which contains comma separated values like: 0.00,12.45,14.33 and
I have a database table named 'student' in which there is one column named
I have a table in database in which there is a column named roll_no,
Suppose there is an image_url column in database. I want the user to choose
Is there a way to search the database if a column name / field
For instance, there’s an integer column in a database table. Then in java model,
I'm using Microsoft SQL Server for my database. There is an ID column in
I have some rows in a database which represent line items in a sale.
I want to create a Spoon transformation which will work on multiple values of
I have a database which has a table with an XML column. The XML

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.