This is the original query:
QUERY(IMPORTRANGE("sheet_name", "Social media posts!A:AS"),"SELECT Col1, Col14, Col12, Col10, Col23, Col16, Col13, Col37, Col2, Col3 WHERE Col2='instagram'")
Output of the original query. Please check column H, which has empty cells.
I was trying to subquery the original query with this formula:
=QUERY(QUERY(IMPORTRANGE("sheet_name", "Social media posts!A:AS"),"SELECT Col1, Col14, Col12, Col10, Col23, Col16, Col13, Col37, Col2, Col3 WHERE Col2='instagram'", 1),"SELECT Col1, SUM(Col2)/Count(Col10), SUM(Col3)/Count(Col10), SUM(Col4)/Count(Col10), SUM(Col5)/Count(Col10), SUM(Col6)/Count(Col10), SUM(Col7)/Count(Col10) group by Col1")
This formula works. However, when i try to add SUM(Col8)/Count(Col10) before the "group by", it doesnt work. Col8 is H column. Error message is :
Unable to parse query string for Function QUERY parameter 2: AVG_SUM_ONLY_NUMERIC