Dúvidas neste Select
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
Curtidas 0
Respostas
Sremulador
02/12/2004
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...
GOSTEI 0