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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:48:48+00:00 2026-06-15T00:48:48+00:00

Hi I got in my database logs about users browser, and it shows, f.ex:

  • 0

Hi I got in my database logs about users browser, and it shows, f.ex:
Firefox 6.0.2, Firefox 6.0.0
Chrome 14.0.835.163 and other versions….
and more

it’s all about version of browser. my question is it possible to do sql question where browser name is -> firefox (all versions), chrome(all version). And i need count them
Now I got something like this:

SELECT `logs`.`log_browser`, COUNT(*) AS `amount` 
FROM `logs` GROUP BY `log_browser`

But it returns me Firefox 6.0.2 and Firefox 6.0.0 as different row
Is it possible? Or do I must do it in php with result?

  • 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-15T00:48:49+00:00Added an answer on June 15, 2026 at 12:48 am

    How about something like this? This uses LOCATE to find the first space, and will group by and return the left part of the browser name.

    SELECT LEFT(log_browser, LOCATE(' ', log_browser)) AS browser, COUNT(*) AS amount
    FROM logs
    GROUP BY LEFT(log_browser, LOCATE(' ', log_browser))
    

    See it in action

    Schema

    CREATE TABLE logs (
      log_browser varchar(25));
    
    INSERT INTO logs VALUES
    ('Firefox 6.0.2'),
    ('Firefox 6.0.0'),
    ('Chrome 14.0.835.163')

    Result

    |  BROWSER | AMOUNT |
    ---------------------
    |  Chrome  |      1 |
    | Firefox  |      2 |
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine I've got a database with lots of data, from which users can search.
I'm transferring my access logs into a database. I've got two tables: urlRequests id
I got mysql database in the phpmyadmin, and i try to connect to the
I've got a database in production for nearly 3 years, on Sql 2008 (was
I've got a database of historical records from WW2 and currently each recorded event's
If you've got a database setup in Django, how can you have the TestRunner
I've got my database set up with three tables - code, tags, and code_tags
I've got a database table with at least three rows in it. From php,
I have a simple problem with XML got from database. Now, this XML can
Okay, so. I've got a database which has a column of timestamps. The start

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.