[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

SQL to LINQ

Hi!

 I need some help to convert this to linq.

SELECT 
	DISTINCT(t1.Value1Id), t1.Value2Id , t1.Value3
FROM 
	Settings t1 
INNER JOIN 
	(
		SELECT Value2Id, MAX(Value1Id) AS MaxQuantity 
		FROM Settings 
		GROUP BY Value2Id
	) t2 
    ON t1.Value2Id = t2.Value2Id AND t1.Value1Id = t2.MaxQuantity 
ORDER BY t1.Value2Id

Open in new window

0
ulf-jzl
Asked:
ulf-jzl
  • 2
2 Solutions
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
You can use LinqPad for it... Give it a shot-
http://www.linqpad.net/
0
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now