How to use GROUP BY in a query while using variables

前端 未结 1 1160
眼角桃花
眼角桃花 2020-12-12 07:15

I\'m using MySql V5.7. I have a table PatientAppointment. I need to GROUP BY CDRId which is a column in the same table. Here\'s the query:

相关标签:
1条回答
  • 2020-12-12 07:54

    Unfortunately, SQL has no way of "merging table cells" like you show in your screenshot. SQL is not like a spreadsheet.

    You must fetch the rows and then work out in application code how you want to group them.

    (You asked me on another thread to come here and give an answer.)

    0 讨论(0)
提交回复
热议问题