LTIMindtree interview question

Reverse a string, star pattern, MySQL queries