I am trying to grouped by attribute 2 [pos] of sqlite database and then get max value of attribute 1 [tagcount].
This works fine in sqlite3 on cygwin.
sqlite>
select max(tagcount),pos
from (
select tagcount,pos
from sense,synset
where sense.synsetid=synset.synsetid
and wordid in(
select wordid
from word
where lemma="run"
)
)
group by pos
order by tagcount DESC;
Resulting in the following output
106|v
18|n
But when I copy the exact query in VB.net it gives me the following error
You tried to execute a Query that does not include specific expression
‘tagcount’ as part of aggregate function
What change should be made in the query so that VB.net does not complaint about it?
It may be your order by as it’s not an aggregated value and isn’t included in your group by.