Advertisement
contatowellington

Untitled

Oct 10th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. SELECT *, sum(total) as vendas, sum(quantidade) as totalquantidade, sum(lucro) as lucratividade
  2. FROM pedidos
  3. WHERE abc = abc
  4. GROUP BY produto
  5. ORDER BY vendas DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement