Resolved: Merging tuples together 0 By Isaac Tonny on 16/06/2022 Issue Share Facebook Twitter LinkedIn Question: When I query my Mysql table to get results. I get a tuple back. The tuple is like this: (('Book 1', 1), ('Book 2', 1), ('Book 1', 2)) How do I get my tuple to be like this: (('Book 1', 3), ('Book 2', 1)) Any suggestions in python or SQL would be helpful. Answer: you can try SQL group by statement with aggregate function ‘sum’ example select book_name,sum(book_quantity) from your_table_name group by book_name If you have better answer, please add a comment about this, thank you! mysql python sql
Resolved: Can’t access static methods from outside until JavaScript’s static block is over?24/03/2023