This week is (hopefully) our final CLI-only project. We are using MySQL to create an online marketplace with different controls for customers, managers, and supervisors. Customers are able to shop in-stock items, purchase them, and affect the database by decreasing the quantities of items and increasing the total sales dollars for each product. User validation prevents customers from buying more stock than is available.
Managers can view the entire store’s inventory (including out of stock items), view low inventory items, reorder any items, and create new products to sell. Supervisors can create new departments for the store and view Profit & Loss reports for each department.
The final result required a combination of Select, Update, and Insert statements along with Join, Group By, and Alias “As” statements, with Sort By to display items in the order I desired.