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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:00:49+00:00 2026-05-25T11:00:49+00:00

Hello I have table in my database holding some browser information I’m currently using

  • 0

Hello I have table in my database holding some browser information I’m currently using the following T-SQL to get a summary list:

SELECT Browser, Version, SUM(Count) as Count FROM AnalyticsBrowsers
WHERE Month=8 AND Year=2011
AND UserAgent NOT LIKE '%YandexBot%'
AND UserAgent NOT LIKE '%Googlebot%'
AND UserAgent NOT LIKE '%Yahoo! Slurp%'
AND UserAgent NOT LIKE '%Exabot%'
AND UserAgent NOT LIKE '%Ezooms%'
AND UserAgent NOT LIKE '%facebookexternalhit%'
AND UserAgent NOT LIKE '%YPBot%'
AND UserAgent NOT LIKE '%Nutraspace%'
AND UserAgent NOT LIKE '%AhrefsBot%'
AND UserAgent NOT LIKE '%Gigabot%'
AND UserAgent NOT LIKE '%GT::WWW%'
AND UserAgent NOT LIKE '%WGet%'
AND UserAgent NOT LIKE '%cmsworldmap%'
AND UserAgent NOT LIKE '%CatchBot%'
AND UserAgent NOT LIKE '%SuperPages%'
AND UserAgent NOT LIKE '%msnbot%'
AND UserAgent NOT LIKE '%nutch%'
AND UserAgent NOT LIKE '%Yeti%'
AND UserAgent NOT LIKE '%Curl%'
AND UserAgent NOT LIKE '%Mediapartners-Google%'
AND UserAgent NOT LIKE '%Python-urllib%'
AND UserAgent NOT LIKE '%AC-BaiduBot%'
AND UserAgent NOT LIKE '%MLBot%'
AND UserAgent NOT LIKE '%YahooCacheSystem%'
AND UserAgent NOT LIKE '%Xenu%'
AND UserAgent NOT LIKE '%DoCoMo%'
AND UserAgent NOT LIKE 'Content Crawler'
GROUP BY Browser, Version
ORDER BY Count DESC

Its not overly pretty but its working so far. I’m getting results that look like:

Browser            Version      Count
Mozilla            5.0          804
IE                 8.0          738
AppleMAC-Safari    5.0          429
IE                 7.0          371
IE                 6.0          271
Firefox            6.0          189
IE                 9.0          137
Firefox            5.0          68
Firefox            3.6.20       42
Firefox            3.6.10       33
Firefox            4.0.1        20
Unknown            0.0          17
Firefox            3.6.18       10
Firefox            5.0.1        9
Mozilla            1.9.2.20     8
Firefox            3.6.13       6
Opera              9.80         6
Firefox            3.6.3        5
Firefox            3.6.12       4
Opera              9.24         4
IE                 5.5          4
Mozilla            1.9.2.16     3
Firefox            3.6.21       3
Firefox            3.6.6        3
Firefox            3.6.8        3
Firefox            4.0          3
Mozilla            4.0          3
Firefox            3.5.19       3

What do I need to do to my T-SQL to combine versions with the same major and minor version number, regardless of what the other build numbers are? For example I would like these to all be grouped together as Version 3.6

Firefox            3.6.20       42
Firefox            3.6.10       33
Firefox            3.6.18       10
Firefox            3.6.13       6
Firefox            3.6.3        5
Firefox            3.6.12       4
Firefox            3.6.21       3
Firefox            3.6.6        3
Firefox            3.6.8        3
  • 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-25T11:00:49+00:00Added an answer on May 25, 2026 at 11:00 am

    Pretty nasty, but you can replace Version with this expression to get all text up prior to the second decimal point:

    LEFT(Version, CHARINDEX('.', Version + '.', CHARINDEX('.', Version) + 1) - 1)
    

    This assumes each version has at least one decimal point (e.g. 1.0).

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

Sidebar

Related Questions

Hello I have a mysql database with in it an addresses table. This is
Hello I have a table on which I have denied SELECT privs to a
Hello i have a products table that contains normal products and configurable product It
I have a table like this: someid somestring 1 Hello 1 World 1 Blah
I have something similar to that: <table> <tr> <td>Hello,<br/>World!</td> </tr> </table> Both lines Hello,
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello we have an SQL server application running over a low bandwith connection. We
Hello I have the following code namespace ConsoleApplication2 { class Program { static void
I have this database table: id | url ----------------------------------------- 1 | http://stackoverflow.com/ 2 |
Hello everybody i hope everybody is doin well, Actually i have a table in

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.