需要帮助编写查询以选择field_value>所有字段该字段的平均值。例如:
SELECT * WHERE NumWords > "Average of total numwords" FROM tblAdverts;
我尝试了这个查询,但没有运气:
SELECT *
FROM tblAdverts
WHERE NumWords >(SUM(NumWords/COUNT(AdID)));
答案 0 :(得分:1)
试试这个:
SELECT * FROM tblAdverts WHERE NumWords >(SELECT AVG(NumWords) FROM tblAdverts)