Reputation: 3
I need the requirements of inserting multiple rows of same ID
My Table Data:
Steam_id Skin_name
steam_id 1 skin_name1
steam_id 1 skin_name2
steam_id 1 skin_name3
steam_id 2 skin_name1
steam_id 2 skin_name2
steam_id 2 skin_name3
Required Output Should be,
Steam_id Skin_name
steam_id 1 3 ( total number of skin )
steam_id 2 3 ( total number of skin )
Please help me to achieve this output.
Thanks.
Upvotes: 0
Views: 192
Reputation: 21873
Try to use below script.
SELECT Steam_id,COUNT(*) Skin_name FROM Table_case GROUP BY Steam_id
Upvotes: 1