SELECT id FROM flights AS f WHERE distance > ( SELECT AVG(distance) FROM flights WHERE carrier = f.carrier);
I've seen periods used in a Ruby class but what exactly is "f.carrier"? Does that action of putting a period in between an alias'ed table and the column name have a name?
From what I understand the action of doing that is allowing us to compare the carrier from "table f" (the one we've created an alias for) to the "flights" table (the non alias version of the table), but what is the action of calling an alias table and the column next to each other with a period called? That is not something I knew you could do in SQL so I want to make sure I understand what it is and learn more about it.