How can I get the maximum and the average of 2 columns? The fields are:
name, price, quantity.
I want to get the maximum and the next by category
How can I get the maximum and the average of 2 columns? The fields are:
name, price, quantity.
I want to get the maximum and the next by category
With this query it will work for you
Where a search is made
SELECT
with the fields you need,MAX
it makes the search for the maximum record found in your table, itAVG
takes the averageWHERE nombre = 'nombre_variable'
if you need the maximum for each nameWHERE nombre = 'nombre_variable'
you can do it with thewhere
Greetings.