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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:06:02+00:00 2026-06-12T12:06:02+00:00

So, I have next table structure : Is there a way to make SQL

  • 0

So, I have next table structure :

Table data Image

Is there a way to make SQL query that counts simillar hashes in r_hash column, than founds this hash in hash column and returns an uid, and count of hashes?

For example – uid – 21520578; type – 1; count – 7?

  • 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-12T12:06:03+00:00Added an answer on June 12, 2026 at 12:06 pm

    Try the below query

    SELECT T1.uid, T1.type, T2.count 
    FROM table T1,
    (
      SELECT r_hash, COUNT(*) AS count  
      FROM table 
      GROUP BY r_hash
    ) T2 
    WHERE T1.hash = T2.r_hash 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with a next structure: +---------+----------+-------+ | user_id | group_id |
I have a SQL database table with the following structure: create table category_value (
I have two tables that I'm querying from. In one table, there are fields
I have a query on database table structure. My Patient Details table in a
Suppose I have the next table structure, table A: | id | |----| |
I have a table that has structure like this (td omitted) <table> <tr class=header>...</tr>
I have the following function. $(function() { $(.sectionHeader:gt(0)).click(function() { $(this).next(.fieldset).slideToggle(fast); }); $(img[alt='minimize']).click(function(e) { $(this).closest(table).next(.fieldset).slideUp(fast);
I have table in which I am inserting rows for employee but next time
Hi I have the following table: Doc | code | Qty | Next 5211386
I have a situation where a defined table structure changes based on a control

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.