0

I have a table that contains a TEXT column and some other information. I am trying to COUNT(*) rows where the text is in a list of strings.

I am trying to use binding statements but I am not sure how to insert multiple elements.

The list is of arbitrary length.

My current attempt:

list = ["it", "'", "is"]
db.execute("""
SELECT text, COUNT(*)
FROM table
WHERE text IN (?)
GROUP BY text
""",list)
Matildes
  • 83
  • 5

0 Answers0