5/7 Correlated Subqueries I
Why do i have to use carrier = f.carrier as the filter variable? Is it because it might be a primary key? If that was the case wouldn't ID work just as well?
select id from flights as f where distance < (select avg(distance) from flights where carrier = f.carrier);