Elavon Interview Question

SQL question (moderate difficulty)