Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- ordini.id as id_ordine,
- items.id as id_prodotto,
- items.prodotto,
- items.pezzi,
- items.qta,
- items.netto_produttore,
- items.imponibile,
- ordini.de_cap
- from
- ordini_2014 as ordini
- inner join
- ordini_items_2014 as items
- on
- ordini.middi = items.middi
- inner join
- comuni as c
- on
- ordini.de_cap = c.cap
- where
- ordini.stato in ('CONSEGNATO', 'RIMBORSATO', 'SPEDITO')
- and
- ordini.data_ordine between '2019-09-03' and '2019-10-03'
- and
- ordini.agente_id = 87061
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement