Hi, I have following SQL query that selects some results from my table:
select avg(c3), count(c3), std
from ssims where obraz = 'lena' group by std order by std
But I have various number of tests performed for different values of std, so it returns me something like that:
0.906176136363636;44;5
0.881669302325582;43;10
0.855873409090909;44;15
0.829195813953488;43;20
0.802071590909091;44;25
0.774523720930233;43;30
0.747213636363636;44;35
0.720115581395349;43;40
0.694712954545455;44;45
0.668683255813953;43;50
What I would like to do is to select average of constant (i.e. 20) number of results for every std value. So after such query, the second column would be 20 for each row.
How to do it? I tried limits and top, but without success