KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following query SELECT Count(*) as Total_Count, Col1 FROM Table1 GROUP BY Col1 ORDER BY Total_Count DESC; I want to zoom in on Col1. The data in Col1 are in the following format: text-abc1 txt4-abcde22 tex6-abc2 text4-imp4 text-efg1 txt-efg43 I want to be able to group it by After the first `-`, any first three/four/five characters match In this example, if we match with first 3 characters. Output will be: Total_Count Col1 3 abc 1 imp 2 efg Any other way to achieve this?
Tags (comma-separated)
Save Edits
Cancel