I have these tables :
work --> id, name, description
subwork --> id, name , work_id
which work_id is foreign key for work table .
Im using this query to get results :
("select work.*, subwork.name from work"
"inner join subwork on subwork.work_id = work.id")
this will return the repetitive values , on the other hand I need all of data in result so distinct
is not helpful . I wanna know is there any way to get results like this :
(work_id, work_name, work_desc, (subwork_name1, subwork_name2, subwork_name3,... ))