Output from DB in python or Shell

Job ID: 34254318

Budget: $10 – $30 USD

I need a script that can give me the following output from the database

SELECT * FROM `queue_calls` WHERE `call_time` LIKE '%2022-07%' AND `queue_name2` LIKE 'XX'

I need to use the number of rows in the database that match.

XX in queue_name2 must be retrieved from a list called name.txt and we must have output from all the lines in the txt file.
Related categories: Python Shell Script