Quantcast
Channel: User shenn - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Group by similar values

$
0
0

SQL server 2012.

I am capturing the UserAgent into my database and I am trying to run some queries on it on it.

I want to lump 32 bit and 64 bit entries together Below is what these show up like in the db.

Mozilla/5.0 (Windows NT 6.1; rv:26.0) Gecko/20100101 Firefox/26.0

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0

my current query:

Select     count(*) as counts, UAfrom        mytablegroup by    UAorder by    counts desc

What would be a good way to do this? Can I do a sub-string on the last X chars? The query I have assumes these are different entries (which is what I would expect to happen)


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>