Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Abaixo colocar o PK_ID da DIM_FATURA
- select distinct aux_codigo_Reserva
- from
- (
- select * from fact_conta_cliente where pk_id in
- (select id_fact_conta_cliente from fact_factura_conta_cliente where id_factura = 22578115)
- ) a
- select count(*), min(a.dt_registo), max(a.dt_registo),sum(a.valor_total)
- from
- (select * from fact_conta_cliente where pk_id in
- (select id_fact_conta_cliente from fact_factura_conta_cliente where id_factura = 22578115)) a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement