select member.name,member.room,tb_chkpoint.pretest,tb_chkpoint.posttest from member,tb_chkpoint where member.member_id=tb_chkpoint.member_id and tb_chkpoint.c_id='1' and tb_chkpoint.u_id='1' and member.room ='isr4b'
ถ้าผมต้องการ MIN ของ tb_chkpoint.pretest ทำไมใส่ MIN(tb_chkpoint.pretest) ไม่ได้ครับ
select member.name,member.room,tb_chkpoint.posttest,min(tb_chkpoint.pretest) as minper from member,tb_chkpoint where member.member_id=tb_chkpoint.member_id and tb_chkpoint.c_id='1' and tb_chkpoint.u_id='1' and member.room ='isr4b'
group by member.name,member.room,tb_chkpoint.posttest
select
member.name,
member.room,
min( tb_chkpoint.pretest),
max( tb_chkpoint.pretest),
min(tb_chkpoint.posttest),
max(tb_chkpoint.posttest)
from member,tb_chkpoint
where member.member_id=tb_chkpoint.member_id
and tb_chkpoint.c_id='1'
and tb_chkpoint.u_id='1'
and member.room ='isr4b'