Let’s say I have the following table :
Name - Country - Age
--------------------
Toto - Switzerland - 10
Titi - France - 12
Tata - Italy - 21
Tutu - England - 13
Tete - Italy - 14
I want to create a sql query as simple as possible to regroup people living in defined grouped countries like :
Group A = Switzerland + Italy
Group B = France + England
I don’t know how to create a group withn my records with a column that could have multiple different values in the same group…
Could somebody help me with this ?
More information : SQL Server 2008 database.
This will group the ppl as per your criteria. If this grouping is static you can have seprate table and use inner join. That will make query more readable