Learn how to query two sqlite tables for python programming