Sql incorrect syntax -
select max(qtd) (select count(int_re_usu) qtd tb_questionario_voar_resposta)
why query dont work? want retrieve max value count
it says incorrect syntax near')'
any ideias?
you need alias on derived table:
select max(qtd) ( select count(int_re_usu) qtd tb_questionario_voar_resposta )
but vincent pointed out, returns 1 row, , think missing group by. can do:
select max(count(int_re_usu)) qtd tb_questionario_voar_resposta group somecolumn
Comments
Post a Comment