Amazon interview question

LP and behavior plus SQL problems.