IBM interview question

1 hard backend question and 1 medium SQL question