Could someone give me a hint how to nest a unnested data structure? I tried all sorts of approuches, however still did not get exactly what I wanted.
I have a bucket with unnested documents, like:
data:{
A,
B,
C,
D,
E,
F
}
And I would like to have something like:
data:{
A,
B,
“address”:
{
C,
D,
E
}
F
}
One off the things I tried is stated below, however, in this case I also have the ID field in the nested data, which I don’t need / want.
SELECT
Body.ID,
Body.CompanyName,
Body.AccountCode,
Body.AccountName,
Body.BankAccount,
Body.EmailAddress,
Body.PaymentCondition,
Body.IBAN,
Body.DateFreeField5,
Body.TextFreeField3,
Address
FROM Accounts AS Body
Join (Select ID, InvoiceAddress, InvoiceAddressPostCode, InvoiceCity, InvoiceCountry, InvoiceState From Accounts) AS Address on Body.ID = Address.ID