updated sql. This time flight detail