I have this table:
CREATE  TABLE `sold` (
`part_ID` INT(11) NOT NULL ,
`date` DATE NOT NULL ,
 PRIMARY KEY (`part_ID`, `date`) ,
 FOREIGN KEY (`part_ID` )
 REFERENCES `part` (`part_ID` );
This table represent parts sold each day, constraint says number of sales should be at least 25 and at most 100. How can I implement this constraint?
I think it should start with something like this:
CHECK ( NOT EXISTS ...
 
    