Tricky query using LLBLGen

Posts   
 
    
Posts: 16
Joined: 15-Apr-2008
# Posted on: 31-Mar-2009 09:06:01   

Hi,

I have three tables Problems, Updates and Votes Updates and Votes have N:1 relation with Problems table.

I want create a dynamic list which generates a query that looks like:

SELECT 
    ProblemId
    ,Subject
    ,< ... Other fields ... >
    ,Votes = (SELECT SUM(Vote) FROM Votes WHERE Votes.ProblemId = Problem.ProblemId)
    ,LastUpdated = (SELECT MAX(UpdatedOn) FROM Updates WHERE Updates.ProblemId = Problem.ProblemId)
FROM 
    Problems 

Is it possible?

I am using version 2.6, Self Servicing

Thanks!

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 31-Mar-2009 10:52:22