I have a table:
ID A B C D
1 10 20 30 5
2 332 80 32 12
3 41 20 82 42
.
.
.
I want to query that gives me
A B C D
Where A contains the average of column A for the top 30 rows of the table, sorted by ID ascending, B contains the average of column B for the top 30 rows of the table, sorted by ID ascending, etc.
If table has less than 30 rows, than still take the average, but average across however many rows it has.