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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:21:10+00:00 2026-05-27T15:21:10+00:00

I have a tbl_user , which contains information about user, and I have a

  • 0

I have a tbl_user , which contains information about user, and I have a tbl_article, which contains articles + the ID of the tbl_user

We have a parent-child relation, because every user may have many articles, that’s why I included user_id in the articles table.

I’d like to list the 10 users that have most articles… I’ve searched everywhere though I couldn’t find it…I’ve thought about it , but in vain, I’m not good in SQL Queries.

Thank you 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-27T15:21:10+00:00Added an answer on May 27, 2026 at 3:21 pm
    SELECT TOP(10)
      tbl_user.id,
      COUNT(tbl_article.user_id)
    FROM
      tbl_user
    LEFT JOIN
      tbl_article
        ON tbl_user.id = tbl_article.user_id
    GROUP BY
      tbl_user.id
    ORDER BY
      COUNT(tbl_article.user_id) DESC
    LIMIT
      10
    

    Depending on which RDBMS you use, you may need TOP(10) or LIMIT 10, etc. I included both so you can see, but only use the one that is used by your RDBMS 😉

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

Sidebar

Related Questions

I have a form which is used to make a Test. User enter a
I have a user table from which I want all values, so I have
I have a table that contains intervals: CREATE TABLE tbl ( user_id: INTEGER, start:
i have a table (tbl_world) which look like this id | first_name | last_name
I am building a form in access database. I have a combo box which
I'm using MySQL 4.2. I have 2 tables: tbl_User stores USERID and REGCODE. REGCODE
I have a script file for MySQL that needs to be run on about
I Have MySQL DB table tbl_users , which has two uid , name ,
I have a scenario which is not easy to explain, but I am sure
I have 3 tables: tbl_Image from which a list of all images will be

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.