sql - Clash of multivalued attribute -


i having database having name , hobbies(as multivalued attribute) , want find out count of occurence of more 1 same value example if sample database

a reading dancing b reading b dancing 

then result should be

list of hobbies  | number of occurrence -----------------|--------------------- reading, dancing | 2  

i think have query this:

select hobbies, count(*) hno  t group hobbies 

that have result set this:

hobbies | hno --------+------ reading | 2  dancing | 2 

now data-set can follow answers of question [concatenate many rows single text string] have them in 1 row.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -