Is it possible to write the equivalent of this TSQL statement in Lambda?
SELECT DISTINCT
pba1.adGroupsId
, Amount = (SELECT pba2.value
FROM ProjectBudgetAdjustment pba2
WHERE pba1.budgetId = pba2.budgetId
AND pba1.adGroupsId = pba2.adGroupsId
AND pba2.metricId IN
(
SELECT id
FROM Metrics
WHERE [description] = 'Amount')
)
, [Hours] = (SELECT pba2.value
FROM ProjectBudgetAdjustment pba2
WHERE pba1.budgetId = pba2.budgetId
AND pba1.adGroupsId = pba2.adGroupsId
AND pba2.metricId IN
(
SELECT id
FROM Metrics
WHERE [description] = 'Hours')
)
FROM ProjectBudgetAdjustment pba1
WHERE pba1.budgetId IN
(
SELECT id
FROM ProjectBudget
WHERE projectId IN
(
SELECT id
FROM Projects
WHERE code = 'xxx'
)
)