Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (select
- ordinidettagli.idCliente as 'idcliente',
- ordinidettagli.CodiceArticoloBreve as 'codice',
- sum(ordinidettagli.Quantita) as 'qta'
- FROM ordiniDettagli
- where ordinidettagli.CodiceArticoloBreve ='00001onep0086'
- and idcliente ='218'
- group by idcliente, codicearticolobreve
- )
- union
- (select
- prenotazionidenorm.idCliente as 'idcliente',
- prenotazionidenorm.CodiceArticolo as 'codice',
- sum(prenotazionidenorm.NumeroCopie) as 'qta'
- from prenotazioniDenorm where prenotazionidenorm.CodiceArticolo ='00001onep0087'
- and idcliente ='218'
- group by idcliente, codicearticolo
- )
- order by qta
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement