I have a table column MARKSHEET_ID with values like:
2020/2021_A22_3_1_10_ACP302_0082 2020/2021_A22_3_1_10_ACR301_01 2020/2021_A22_3_1_10_ACR302_01 I want to select the count of the distinct values just untill the character before the fifth occurence of underscore.
In my example I want to get the count of 2020/2021_A22_3_1_10 as 1