Assignment 03
Assignment 03
1. ASC
2. DESC
3. GROUP BY
4. ORDER BY
5. DISTINCT
6. COUNT
7. MAX
8. MIN
9. AVG
Before executing the commands, we will create a table named students with
relevant columns.
3. GROUP BY
Grouping students by city and calculating the average marks in each city.
4. ORDER BY
5. DISTINCT
6. COUNT
9. AVG (Average)
To proceed with these commands, we first have to add data matching the
commands,
● Issue: The LIKE operator is used for pattern matching, and since 'A' is a single
character without wildcards, it will not return any results unless there is a name that is
just 'A'.
● This query looks for names where 'A' appears as the third character.
5. LIKE '_A%R_' (Second Letter is 'A', Ends in 'R', and has at Least Four Letters)
● _A%R_ means:
● The last letter must be at least one more character after 'R'.
● This query is incorrect because the LIKE operator must be followed by a pattern
inside single or double quotes.