How To Run Sql Queries In Python For All Selected Lines