Skip to content
Advertisement

Need SQLQuery with Stored procedure with below example

I have the following MySQL-table

the average must be using stored procedure, not normal query.

I have normal SQL Query

I want that to look like this, with a MySQL query:

Advertisement

Answer

If the Id‘s on your table are unique, you can do it like this (you were pretty close… just the case when was missed in your query):

You can test on this db<>fiddle

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement