Amazon Interview Question

Logical Jar problem,Basic aptitude concepts(time and work),Questions about SQL query