However, this code doesn't output the flights that are most delayed upon departure from each destination, but instead the flights that are overall the most delayed.
If I misunderstood the question or the answer, please let me know. I am using this book to learn, so it is possible I don't know something the author of this solution does.
The question asked in the book is "Find the flights that are most delayed upon departure from each destination.
The answer offered in the solutions book is -
However, this code doesn't output the flights that are most delayed upon departure from each destination, but instead the flights that are overall the most delayed.
I could be wrong, but I believe this is the code needed to show the flights that are most delayed upon departure from each destination.
This code outputs one row for each destination. I used arrange, but I don't even know if it is strictly necessary with what the question is asking.
If I misunderstood the question or the answer, please let me know. I am using this book to learn, so it is possible I don't know something the author of this solution does.
Thanks!