Alias
Alias is a nickname. SELECT name AS student FROM students; column alias. FROM students AS s — table alias. Required when the same table is used twice or a derived table.
AS is optional — students s. Use aliases in JOIN … ON s.roll = m.roll so every column is qualified.
Trap: SELECT marks - 40 fail without quotes — fail looks like a column. AS fail or AS 'fail'. Trap: using the alias in WHERE (WHERE runs before SELECT aliases in MySQL — use HAVING or repeat the expression).
On the example next to this theory: Alias: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
SELECT name AS student FROM students s;