Think of it as a safe interpolation operator: the Ecto query doesn’t see your variables outside the from macro call unless you tell it to look outside itself. You using the ^ is marking that the variable is outside the DSL language of the macro to separate the variables like p that represent a table. This always the macro to detect errors and typos at compile time as it can be sure if a variable is in the DSL or from the scope.