I need a python code or an algorithm. I have two sql select query. the first sql result as subject list like: English, Science, Math and display to be a column and the secon