This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.
An additional, more advanced exercise of summarizing character occurrences.
Given a certain string, for example “hello world”.
Write a query that displays the number of times each letter appears in the string.
For example, the following result is achieved for “hello world”: