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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:42:05+00:00 2026-06-04T21:42:05+00:00

I have been looking for a little while for a solution to this problem,

  • 0

I have been looking for a little while for a solution to this problem, and haven’t really found an answer that works.

I have a MySql table like this:

URL                                   Domain          Clicks
http://www.example1.com/erte.html     example1.com    10
http://www.example2.com/xndd.html     example2.com    5
http://www.example3.com/4567.html     example3.com    4
http://www.example1.com/bcdv.html     example1.com    7
http://www.example1.com/098i.html     example1.com    17

It shows a URL, the domain that the URL points to, and the number of clicks that were recorded for each of the URLs.

I want to be able to show the most popular domain, using the value I get by adding the number of total clicks for that domain, regardless of which actual URL it was.

So, based on my sample values:

example1.com = 34
example2.com = 5
example3.com = 4

So far the examples I’ve been able to find show how to find the popularity of an item based on how many times it is shown in the database. However, that doesn’t include the “clicks” column like I’m trying to do.

Following the examples I have found so far would get me:

example1.com = 3
example2.com = 1
example3.com = 1

Which isn’t really what I’m looking for.

I’m not sure how to do this in an efficient way, and would appreciate any help that I can get.

  • 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-04T21:42:08+00:00Added an answer on June 4, 2026 at 9:42 pm

    try:

    select domain, sum(clicks) as "total_count" from TABLE group by domain order by total_count asc
    

    That will give you your totals ordered from lowest to highest (in clicks)

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

Sidebar

Related Questions

I have been looking for an answer to this for a while with no
Now, I have been looking for the answer to this for a while, but
so my studies have led me to this little problem. (ive been into php
So I am a little confused, I have been looking around trying to determine
I have been looking everywhere for a snippet of code that will calculate the
I have been looking for some good statistics package for Common Lisp, that should
I have here a long method that takes a little while to execute. I
I have been looking to make my application a little more scalable by specifying
I have been looking for a 5-Star rating control for a while now and
I've been bashing my head against this one for a while now. I have

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.