score:1
Accepted answer
you can try the following sample code:
var results = _customerTable.GroupBy(c => new {c.Date, c.CUSTOMER_TYPE_ID}).Select(g => new {g.Key.Date, g.Key.CUSTOMER_TYPE_ID, MyCount = g.Count()});
using this way you can get number of recors per Date
and CUSTOMER_TYPE_ID
.
Source: stackoverflow.com
Related Articles
- Linq to SQL get distinct records grouped by date
- How to select only the records with the highest date in LINQ
- LINQ Source Code Available
- Distinct Date with Linq
- C# LINQ query (MYSQL EF) - Distinct and Latest Records
- how do I write LINQ query to retrieve distinct records based on only specific properties?
- linq query distinct date
- c# Linq select distinct date time days
- Selecting distinct records in a declarative linq data source?
- LINQ Select newest records that have distinct ForeignKeyId column
- LINQ VB how to select records with the max date (highest date)
- IEqualityComparer and Linq Distinct - Hard Code GetHashCode()
- Linq query distinct values of date for last 7 days, exception thrown when running query
- Linq Query to Get Distinct Records from Two Tables
- Use Linq to filter on distinct options and newest date
- creating Linq to sqlite dbml from DbLinq source code
- Select all distinct last records of column1 and order by column2 in Linq (Not Working Accordingly)
- Linq, combining multiple records into comma separated string, grouped by distinct value
- LINQ distinct by 2 properties and by create date
- LINQ query for getting row with max date in grouped table
- How to use LINQ Group Records and use Distinct
- GroupBy using LINQ but base distinct on another column, and still be able to count other records
- How return distinct records using LINQ
- C# Linq to Entities get records where date range contains dates in the current month
- Linq query to order a list based on date and get distinct
- Getting grouped date range using linq
- C# linq get records where date range is in a selected week
- Order By Date print Latest 20 records only in LINQ
- Linq to SQL | Top 5 Distinct Order by Date
- LINQ for getting the 5 latest records for each distinct name
- How can I rewrite Linq Extension Methods as delegates?
- How can I evaluate a deferred Linq statement when debugging?
- better way of doing a linq query using new
- Editting a 2D array with Linq and ForEach
- How to pass func expression in LINQ where clause?
- LINQ - select filename and filesize together from Directory.EnumerateFiles
- Trying to concatenate columns in LINQ
- LINQ Modify XML document
- making a list of int from navigation property field of an Entity
- Any LINQ alternative for loop in reflection?
- Obtaining the outcome of a LINQ Select Query and assigning it to a string
- linq to accept nullable value
- Linq select statement not working after grouping
- Build dynamic LINQ queries from a string - Use Reflection?
- Check value of one item of tuple from other item
- Linq Query from Same table with multiple conditions
- Entity Framework Relationships Foreach
- Summarise arbitrary data with LINQ
- Remove ListViewItem using its tag property and without a foreach loop
- Create new ID without identity in SQL by using LINQ