One way to approach such a problem is what I just did:
- Google "sql vowel" and find http://stackoverflow.com/questions/13753498/select-vowels-from-a-varchar-oracle-pl-sql
- Look up REGEX functions in the SAP HANA documentation and find OCCURRENCES_REGEXPR - SAP HANA SQL and System Views Reference - SAP Library
- Fiddle a bit with it to come up with a query that counts vowels for one column
select user_name,
OCCURRENCES_REGEXPR ( '[aeiou]' FLAG 'i' in user_name) as VOWEL_COUNT
from public.users;
USER_NAME | VOWEL_COUNT |
SYS | 0 |
SYSTEM | 1 |
_SYS_STATISTICS | 3 |
_SYS_EPM | 1 |
_SYS_REPO | 2 |
_SYS_AFL | 1 |
DEVDUDE | 3 |
ADMIN | 2 |
PUBLICJOE | 4 |
DEDUDE | 3 |
JDBCDUDE | 2 |
OZDUDE | 3 |
_SYS_TASK | 1 |
_SYS_XB | 0 |
From here it's trivial to come to a combined firstname/lastname vowel count.
- Lars