SHARE
TWEET

Untitled

a guest Jun 24th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     SUM(a.valor - a.desconto - a.credito + a.frete)
  3. FROM
  4.     pedidos a,
  5.     cadastro b
  6. WHERE
  7.     a.status = '2'
  8.     AND a.data >= '2019-03-29'
  9.     AND a.data <= '2019-04-29'
  10.     AND a.id_cliente = b.id
  11.     AND b.id_cidade = '2378'
  12.      
  13. SELECT
  14.     SUM(a.valor + a.frete)
  15. FROM
  16.     pedidos a,
  17.     cadastro b,
  18.     produtos_pedidos c
  19. WHERE
  20.     a.status = '2'
  21.     AND a.data >= '2019-03-29'
  22.     AND a.data <= '2019-04-29'
  23.     AND a.id_cliente = b.id
  24.     AND b.id_cidade = '2378'
  25.     AND a.id = c.id_pedido
  26.     AND c.grupo = '234'
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