Table relationship:
question:
how to query the data shown in the figure using native sql statements?
expected data structure (the list item of the product appears as a nested object):
{
"category": [
{
"id": 1,
"name": "name1",
"product":[
{
"id":2,
"detail":""
},
{
"id":8,
"detail":""
}
]
}
]
}