IBM Interview Question

1 hard backend question and 1 medium SQL question