0
have a table
id  produto  vendas      data
 1  laranja     4     16-10-2016
 2  cenoura     3     16-10-2016
 3  cenoura     6     17-10-2016
 4  laranja     5     17-10-2016
 5  laranja     1     18-10-2016
 6  laranja     1     19-10-2016
the sum of oranges in 11 the carrot sum of the 9... How do I make the answer to be orange 11(take the best selling item and the sum)??
Limit 1 would be to catch only the biggest, if put 2 will catch the biggest 2?
– Dan Even
Yes. If you do not place LIMIT you will get all, from the best seller to the least sold.
– bfavaretto
But with that and I can’t figure out which product sold the most.
– Dan Even
for me here only appears the sum of the product best sold, but does not say which product is
– Dan Even
Must have
produtoin select, as in my example, right at the start– bfavaretto
@Daneven I put a link to a functional example for you to see, with LIMIT commented.
– bfavaretto