Database Consider a database for an online store with the following tables. (You can find the ER-Model on Canvas.) - Pri

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Database Consider a database for an online store with the following tables. (You can find the ER-Model on Canvas.) - Pri

Post by answerhappygod »

Database Consider A Database For An Online Store With The Following Tables You Can Find The Er Model On Canvas Pri 1
Database Consider A Database For An Online Store With The Following Tables You Can Find The Er Model On Canvas Pri 1 (79.01 KiB) Viewed 38 times
Database Consider a database for an online store with the following tables. (You can find the ER-Model on Canvas.) - Price (prodID, from, price) - Product (prodID, name, quantity) - PO (prodID, orderID, amount) - Order (orderID, date, address, status, trackingNum- ber, custID, shipID) - Shipping (shipID, company, time, price) - Customer (custID, name) Address (addrID, custID, address) Problems Implement the following queries in SQL. a) Determine the ID and current price of each product. Note: Current means at the time the query is run. SQL Server allows to determine the current date with GetDate(), and MySQL has the function CurDate(). Dates in SQL are just large numbers internally. The larger the number, the later the date (i. e., yesterday < today < tomorrow). You can compare them with the usual comparison operators (< >, etc.). Additionally, the aggregation functions min () and max() work as intended. Hint: You will need to join the table Price with itself. Do not forget about future price changes. b) The names of all customers who ordered the same product at least three times in different orders. (If a customer ordered product X two times in the same order, it only counts as one.) c) Determine, for each customer, its ID and the total number of products ordered. (If a customer ordered product X two times in the same order, it counts as two.)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply