In ModelBuilder I am trying to perform the following query, using the select by attribute tool. I am having great difficulty with the sql syntax.
What I am trying to do is
Select Top 3 (Avg) Price, GasID Group by GASID order by GASID
The help indicates that aggregrate functions need to be performed in subqueries only? Is this true.
I don't want a subquery. Only this works but returns no rows and it is not what I am looking for:
"RegGasPrice" = (SELECT MAX( "RegGasPrice") FROM gasprices). There is no "in" so I must use equal.
Any assistance would by greatly appreciated.