嗨,这是我的输出格式:
--------------------------------------------------------------------------------
CLASS TOTAL NO OF STUDENTS STUDENTS PURCHASED REMAINING STUDENTS
1A 52 26 26
这里的'student_table‘包含学生的id和班级。
“purchase_table”包含购买这件衣服的学生身
我有以下示例数据的MySQL表:
create table prices (
id INTEGER PRIMARY KEY AUTO_INCREMENT,
store_id INTEGER NOT NULL,
item INTEGER NOT NULL,
price FLOAT NOT NULL
);
insert into prices values(1,1,1,1.25);
insert into prices values(2,1,2,.99);
insert into prices values(