With this select I do various calculations. I have only used it in MYSQL works perfect.
select nome, ((select count(*) from JOGOS where timea=times.nome)+(select count(*) from JOGOS where timeb=times.nome)) as qtdejogo,(((select count(*) from JOGOS where timea=times.nome and resultadoa>resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa<resultadob))*3)+(((select count(*) from JOGOS where timea=times.nome and resultadoa=resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa=resultadob))*1) as ponto from times order by ponto desc
BD ACCESS, if I leave with the error of the ORDER BY POINT:
select nome, ((select count(*) from JOGOS where timea=times.nome)+(select count(*) from JOGOS where timeb=times.nome)) as qtdejogo,(((select count(*) from JOGOS where timea=times.nome and resultadoa>resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa<resultadob))*3)+(((select count(*) from JOGOS where timea=times.nome and resultadoa=resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa=resultadob))*1) as ponto from times order by 'ponto' desc
What's wrong with this select?