ANR Software interview question

Normal java and sql concepts