Posts by João Pedro Dutra • 11 points
2 posts
-
0
votes1
answer512
viewsA: Sub-Select with MAX / SUM / INNER JOIN?
Thanks, Motta! I got it using the tools you gave me. It looks like this: 'SELECT Descricao, MAX(Faturamento) Faturamento FROM (SELECT SUM(P.preco * I.qtde) Faturamento, P.descricao FROM produto P…
-
1
votes1
answer512
viewsQ: Sub-Select with MAX / SUM / INNER JOIN?
I need to make a SUM within a MAX to return higher product billing within a summary. I got by doing this: SELECT MAX(Faturamento) MAX_Faturamento FROM (SELECT SUM(P.preco * I.qtde) Faturamento FROM…