SHARE
TWEET

Untitled

a guest Oct 14th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select
  2.     ordini.id as id_ordine,
  3.     items.id as id_prodotto,
  4.     items.prodotto,
  5.     items.pezzi,
  6.     items.qta,
  7.     items.netto_produttore,
  8.     items.imponibile,
  9.     regione
  10. from
  11.     ordini_2014 as ordini
  12. inner join
  13.     ordini_items_2014 as items
  14. on
  15.     ordini.middi = items.middi
  16. inner join (
  17.     select regione from comuni,ordini_2014 where ordini_2014.de_cap = comuni.cap limit 1
  18. ) as regione
  19. where
  20.     ordini.stato in ('CONSEGNATO', 'RIMBORSATO', 'SPEDITO')
  21. and
  22.     ordini.data_ordine between '2019-09-03' and '2019-10-03'
  23. and
  24.     ordini.agente_id = 87061
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top