Home > Net >  The GroupBy LINQ also query out how to let the quantity to zero.
The GroupBy LINQ also query out how to let the quantity to zero.

Time:11-25

RT.

CodePudding user response:

GroupBy is grouping the data, no points to check?

CodePudding user response:

reference 1st floor Hello_Ge response:
GroupBy is the data packet, no points to check?

I through the table a number of fields to GROUP BY table 2 zero let the count is zero, the effect with a GroupBy can do?

CodePudding user response:

refer to the second floor qq_28503747 response:
Quote: refer to 1st floor Hello_Ge response:

GroupBy is grouping the data, no points to check?

I through the table a number of fields to GROUP BY table 2 zero let the count is zero, the effect with a GroupBy can do?


GROUP BY only the data packet, the count is zero, there is no data, as far as I know there is no way, for a long time didn't write the SQL, you wait for someone else to answer them

CodePudding user response:

refer to the second floor qq_28503747 response:
Quote: refer to 1st floor Hello_Ge response:

GroupBy is grouping the data, no points to check?

I through the table a number of fields to GROUP BY table 2 zero let the count is zero, the effect with a GroupBy can do?


To understand the inner join with the left join query in differences in Linq,

CodePudding user response:

Loop control is, since you said want to take the number zero group out, have to type in different groups is known, and you must be there is a table, then you cycle known table group by the data, then any judgment, if true won't add to zero this grouping, zero if false will add the group

CodePudding user response:

refer to fifth floor interacting in a professional developer response:
Quote: refer to the second floor qq_28503747 response:

Quote: refer to 1st floor Hello_Ge response:

GroupBy is grouping the data, no points to check?

I through the table a number of fields to GROUP BY table 2 zero let the count is zero, the effect with a GroupBy can do?


To understand the inner join with left join query difference in Linq,

Positive solution,

CodePudding user response:

Your side, equivalent to a table is the main table, table 2 it is to join table (contain groupby) fields,
With the
From a table in a
Join in table 2 b
On a. associated field equals b. associated fields
Group b by b. grouping field into c
In the from d c.D efaultIfEmpty ()
Select new
{
.
};
Is equal to the upstairs said left the join
  •  Tags:  
  • LINQ
  • Related