Your question is Anagram Check With SQL. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
How would you write a query to check whether two given strings are anagrams of each other?
Assume comparisons are case-insensitive and ignore spaces and non-alphanumeric characters. Return false when either input is NULL.
pair_id, left_string, right_string, and is_anagrampair_id ascending| Column | Type | Description |
|---|---|---|
| string_idPK | INT | Identifier for an input string |
| input_string | VARCHAR(255) | String to compare |
| Column | Type | Description |
|---|---|---|
| pair_idPK | INT | Identifier for a string pair |
| left_string_id | INT | Reference to the first string |
| right_string_id | INT | Reference to the second string |