Home Changing 3 column to 1 and taking a count of its customers in SQL Server
Reply: 0

Changing 3 column to 1 and taking a count of its customers in SQL Server

user5821
1#
user5821 Published in September 21, 2018, 8:04 am

I have this following that I need to roll to "Chinese" only and take a count of all these 3 Chinese languages:

so my desired output is one row as follows:

Chinese as PrimaryLanguage and 900 as Total count. The rest of the list contains a lot of other languages that I don't need to roll.

Thanks in advance.

share|improve this question
  • Always show what you have tried.. – Tobb Feb 13 at 19:55
  • Strip off everything after a hyphen?? case when primaryLanguage like 'Chinese%' then 'Chinese' else primaryLanguage end?? – shawnt00 Feb 13 at 20:07

3 Answers 3

active oldest votes
up vote 1 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.332809 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO