此查询将返回错误(字段列表中的未知列 numero_propostas)。我想要的是这样的:
SELECT COUNT(*) as numero_propostas,
total as total,
(numero_propostas / total) as divisao
FROM ConsultaArtigos2 AS ca
...
正确的方法是什么?
此查询将返回错误(字段列表中的未知列 numero_propostas)。我想要的是这样的:
SELECT COUNT(*) as numero_propostas,
total as total,
(numero_propostas / total) as divisao
FROM ConsultaArtigos2 AS ca
...
正确的方法是什么?
SELECT COUNT(*) as numero_propostas,
total as total,
(COUNT(*)/ total) as divisao
FROM ConsultaArtigos2 AS ca...
在 MySQL 查询语句中,您必须在引用位置使用列名
SELECT COUNT(*) as numero_propostas,
total as total,
(COUNT(*) / total) as divisao
FROM ConsultaArtigos2 AS ca