solution#185
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because the current task.sql does not run cleanly on MySQL due to a syntax issue, which violates the requirement that the script execute without errors [CHECKLIST ITEM #11]. Specifically, the last two CREATE INDEX statements in task.sql (the ones creating indexes on FirstName and LastName in the Customers table) are missing trailing semicolons, so MySQL tries to parse them together and fails with a syntax error. To fix this, add a ; at the end of each CREATE INDEX statement, for example:
CREATE INDEX FirstName ON Customers(FirstName);
CREATE INDEX LastName ON Customers(LastName);Once those semicolons are added, the script should execute successfully, and your otherwise well-chosen indexes (Email, Product Name, foreign keys, Date) will be properly created. As a minor, non-blocking improvement, consider whether indexes on FirstName, LastName, and Price are truly needed based on the described queries, but this is not required for passing. Overall, you’re very close; fix the syntax so the script runs without errors and the task will be complete.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| CREATE INDEX Date ON Orders(Date); | ||
| CREATE INDEX OrderID ON OrderItems(OrderID); | ||
| CREATE INDEX Price ON Products(Price); | ||
| CREATE INDEX FirstName ON Customers(FirstName) |
There was a problem hiding this comment.
This statement is missing a trailing semicolon, which will cause the following line to be parsed as part of the same command and make the script fail when run (checklist item #11 requires task.sql to run without errors).
| CREATE INDEX OrderID ON OrderItems(OrderID); | ||
| CREATE INDEX Price ON Products(Price); | ||
| CREATE INDEX FirstName ON Customers(FirstName) | ||
| CREATE INDEX LastName ON Customers(LastName) |
There was a problem hiding this comment.
Same as the previous line, this CREATE INDEX needs a semicolon at the end so MySQL can execute each statement separately.
No description provided.