Make SQL queries joins-safe

When providing a joined model, ambiguous column names appear. Defining the table name prevents this.