Hola, es lo que te dec
ia rulo_m asi:
Código Delphi
[-]ADOQuery2.SQL.Add('Select Distinct as Co1.NUM_COTIZACION,(Select Max(as Co2.NUM_SUBCOTIZACION) from SIE_COTIZACIONES Co2 where Co1.NUM_COTIZACION =Co2.NUM_COTIZACION)');
ADOQuery1.SQL.Add('from SIE_COTIZACIONES as Co1');
Saludos.
Edito: ya rulo_m contestó.