Rheal Software Interview Question

Mostly on logic and sql