I am new in LLBL gen pro, I have to write Sub query using LLBL gen pro,but I am not getting any sample of how to write this. This is the query I have to write, I know how to define fields, relations and predicate expression.
select UserId, TransactionId from
UserTransaction
where TransactionId in
(
select MaxId as TransactionId from
(SELECT MAX([TransactionId]) as MaxId, userid
FROM [UserTransaction]
group by userid) u1
inner join [UserTransaction] c2 on u1.MaxTId = c2.CCLeadTransactionId
where UserTypeId in (4,5)
)
and this is my table structure
UserTransaction
TransactionId userid UserTypeId
How can I write this query
select MaxId as TransactionId from
(SELECT MAX([TransactionId]) as MaxId, userid
FROM [UserTransaction]
group by userid) u1
inner join [UserTransaction] c2 on u1.MaxTId = c2.CCLeadTransactionId
where UserTypeId in (4,5)