I have a Winform with MS Access database and want to search for the Top 10 repeaters numbers in a column. The code below will return the first 10 rows. I need to check if a number is repeated in the column and count. I have searched everywhere can someone help?
I have also tried group and sort last code didnt work either.
- string queryString = "SELECT SheetID, Part FROM ILC";
- queryString = "select top 10 Part,Part from ILC";
- loadDataGrid(queryString);
I tried editing this but didnt work.
- var q = from c in ILCdb
- group c by c.Part into g
- select new { g.Key, Count = g.Count() };
-
- var categoryCounts =
- from p in ILCdb
- group p by p.Part into g
- select new { Category = g.Key, ProductCount = g.Count() };