Concatenate multiple data rows into one row
问题 I have three tables and I want to merge book ids that have readers and versions into one rows. Readers and Version should be concatenated with ','. Book Id name description ---------------------- 1 Book1 Book 1 Title 2 Book2 Book 2 Title 3 Book3 Book 3 Title 4 Book5 Book 5 Title BookReader BookId Name ---------------------- 1 James 2 Stephane 2 Michael BookVersion BookId version ---------------------------------- 1 v1 1 v2 2 v1 2 v2 2 v3 For now i use this query select b.id as BookId, r.name