I have some problems with writing a SQL query for MySQL. I have a table with the following structure:
mysql> select id, pass, val from data_r1 limit 10; +
As I understand, you want the average value for each id at each pass. The solution is
SELECT id, pass, avg(value) FROM data_r1 GROUP BY id, pass;