Correlated Subquery Lesson 5/7/ Table Transformations

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

So this code passes correctly, I was just curious for what does the final statement mean. What is the significance of having carrier = f.carrier? Thanks!

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

<In this course, it often helps to include a screenshot of your whole web browser – that lets everyone see what you see. If you wish to include a screenshot, add it below this line.>

<If you wish to copy/paste in your code, you can use this next section. This will allow others to copy/paste your code for testing – something that they won’t be able to do with just a screenshot.>

```

SELECT id
FROM flights AS f
WHERE distance < (
SELECT AVG(distance)
FROM flights
WHERE carrier = f.carrier);

<do not remove the three backticks above>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.