我需要通过一个函数或程序来计算读者(如果可能的话,通过他的idi的参数)应该多少书。请帮忙做到这一点。
表格
Create table Form (
idForm int not null primary key auto_increment,
date_of_issue date not null,
return_date date ,
idBook int not null
idReader int not null);
填写表格
Insert into Form (idForm, date_of_issue, return_date, idBook,idReader)
Values(1, "2018-11-11","2018-11-11",1,4);
Insert into Form (idForm, date_of_issue, return_date, idBook,idReader)
Values(2, "2019-11-11","2019-11-11",2,4);