optimization in sql

optimization in sql