Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Unanswered: hard query (for me atleast)

    All right guys, I'm having trouble writing a query here's what I'm trying to do:

    I have a column (loc) that often contains the same text, what I'm trying to do is to take a count of how many times one name shows up, and see which one shows up the most.
    Here's a screenshot of what the column looks like.

    I've tried doing Count distinct, but I can't get the results I need.

    Thanks for any help!

  2. #2
    Join Date
    Jul 2009
    Posts
    2
    SELECT loc, COUNT(*) AS c
    FROM log
    GROUP BY loc
    ORDER BY c DESC
    LIMIT 1



    Someone helped me over @ wht

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •