Fixed alias in SQL equivalent