SELECT count(*), idstagiaire
FROM absence
natural join stagiaire
where idfliere=2 AND typeabcense='nojustifie'
AND GROUP By idstagiaire;
我收到错误:
缺少表达
stagiaire(idstagiaire,nom,prenom,idfliere,totalabsence)
Filiere(idfliere,nomfiliere)
module(idmodule,nommodule,nbrmodule)
fil_module(idfliere,idmodule)
absence(idabsence,dateabence,idstagiaire,idmodule,typeabcense)
答案 0 :(得分:1)
试试这个
SELECT count(*),idstagiaire FROM absence natural join stagiaire where
idfliere=2 AND typeabcense='nojustifie'
GROUP By idstagiaire;
答案 1 :(得分:1)
删除最后一个and
:
SELECT count(*),idstagiaire
FROM absence natural join stagiaire
where idfliere=2 AND typeabcense='nojustifie'
GROUP By idstagiaire;
答案 2 :(得分:1)
SELECT count(*),idstagiaire
FROM absence natural join stagiaire where idfliere=2 ANDtypeabcense='nojustifie'
AND-------------------------------> Remove this AND
GROUP By idstagiaire;
答案 3 :(得分:1)
从查询中删除第二个“ AND ”
SELECT count(*), idstagiaire
FROM absence
natural join stagiaire
where idfliere=2 AND typeabcense='nojustifie'
GROUP By idstagiaire;
答案 4 :(得分:0)
以下代码
AND GROUP By idstagiaire;
AND是错误,在分组之前删除AND,如果要添加另一个条件,则在AND之后添加它, 例如
AND 'YOUR NEW CONDIOTION HERE' GROUP By idstagiaire;
答案 5 :(得分:0)
尝试没有最后的 AND 。
SELECT count(*), idstagiaire
FROM absence
natural join stagiaire
where idfliere=2 AND typeabcense='nojustifie'
GROUP By idstagiaire;