Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions task.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# Write your SQL code for the database creation here. Good luck!
USE ShopDB;
USE ShopDB;


CREATE INDEX Name ON Products(Name);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the previous automated test failure, indexes should follow the idx_ prefix convention: use idx_product_name instead of Name for the Products table index.



CREATE INDEX Email ON Customers(Email);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the previous automated test failure, indexes should follow the idx_ prefix convention: use idx_customers_email instead of Email for the Customers table index.



CREATE INDEX CustomerID ON Orders(CustomerID);
CREATE INDEX Date ON Orders(Date);


CREATE INDEX OrderID ON OrderItems(OrderID);
CREATE INDEX ProductID ON OrderItems(ProductID);
Loading