- 1
MySQL RateModel(cid, m, r)
Write a stored procedure RateModel(cid, m, r) which inserts a new rating r for model m by customer cid into table ratings. The rating_time should be the current date and time. This procedure allows rating NULL to be inserted only if the previous rating of model m by cid is not NULL. This procedure also updates the discount for this cid in table customers as follows. If a customer has rated 5 or more products (counting only non-NULL current ratings) and their discount in table customers is less than 10.0 then change their discount in table customers to 10.0.
1 Odpowiedź
0
Please take a look at the forum rules:
https://www.sololearn.com/Content-Creation-Guidelines/
https://www.sololearn.com/Discuss/1316935/?ref=app