select
cliente.codcliente,
cliente.dt_cadastro
from cliente
where cliente.codcliente in ('00000224', '00000170', '00061825', '01009838')
order by cliente.codcliente
selectnfsaidc.codcliente,nfsaidc.numnf,nfsaidc.dt_emissao,nfsaidc.totalnffromnfsaidcwhereNFSAIDC.CODCLIENTEin('00000224','00000170','00061825','01009838')orderbynfsaidc.numnf
Personally,IneedtoretuneonlyonerowofeachclientwiththecolumnsCODE,DT_CADASTRO,NUMNF,DT_EMISSAO,TOTALNF.Theresultwouldbethedatethatthecustomerwasregisteredwiththefirstpurchasemade.TheresultIneedwouldbetheimagebelow:
I am using IBEXPERT with Firebird 2.1 but I accept suggestions from other platforms.