Dúvidas neste Select
02/12/2004
0
Estou querendo selecionar os clientes q mais locaram, até ai tudo bem,
pois já consegui, só q agora o problema é ordenar por ordem
decrescente a coluna tot_quant.
Segue o select q estou tentando e naum está funcionando quando tento
ordena-lo
Select itl_codigo_cliente,cli_nome,sum(itl_qtd_titulo) as tot_quant
from itenslocacao,cliente
where itl_codigo_cliente = cli_codigo
group by itl_codigo_cliente,cli_nome
order by tot_quant desc
pois já consegui, só q agora o problema é ordenar por ordem
decrescente a coluna tot_quant.
Segue o select q estou tentando e naum está funcionando quando tento
ordena-lo
Select itl_codigo_cliente,cli_nome,sum(itl_qtd_titulo) as tot_quant
from itenslocacao,cliente
where itl_codigo_cliente = cli_codigo
group by itl_codigo_cliente,cli_nome
order by tot_quant desc
Wiltefran
Curtir tópico
+ 0
Responder
Posts
02/12/2004
Sremulador
Select itl_codigo_cliente,cli_nome,sum(itl_qtd_titulo) as tot_quant
from itenslocacao,cliente
where itl_codigo_cliente = cli_codigo
group by itl_codigo_cliente,cli_nome
order by 3 desc
acho que deve ser isto mas só no fire...
from itenslocacao,cliente
where itl_codigo_cliente = cli_codigo
group by itl_codigo_cliente,cli_nome
order by 3 desc
acho que deve ser isto mas só no fire...
Responder
Clique aqui para fazer login e interagir na Comunidade :)