0
請讓我知道我將如何使Linq查詢出來。Sql Linq查詢
SELECT
[GroupBy1].[K1] AS [AccountName],
[GroupBy1].[K2] AS [LeadBy],
[GroupBy1].[K3] AS [Status],
[GroupBy1].[K3] AS [Industry],
[GroupBy1].[A1] AS [C2]
FROM (SELECT
[Extent1].[AccountName] AS [K1],
[Extent2].[LeadBY] AS [K2],
[Extent2].[Status] AS [K3],
[Extent2].[Industry] AS [K4],
COUNT(1) AS [A1]
FROM [dbo].[Opportunities] AS [Extent1]
join [dbo].[Leads] AS [Extent2]
on [Extent1].[AccountName] IS NOT NULL
AND [Extent1].[AccountName]=[Extent2].[AccountName]
GROUP BY [Extent1].[AccountName],[Extent2].[Leadby],[Extent2].[Status],[Extent2].
[Industry]
) AS [GroupBy1]
但是這個時候你能幫我一下,因爲我急需有兩個表的潛在顧客和Oppurtunity,我想要得到由Lead創建的Oppurtunities數量 – user1847109