Python : where clause with group by clause in sqlite

时间:2018-02-03 08:25:35

标签: python-2.7 sqlite

I am using python 2.7 with sqlite.
Can anyone tell me how to add GROUP BY coulmn in this query.

cur.execute("SELECT `column1`,`column2` FROM `table` WHERE `name`=?",(name,))

1 个答案:

答案 0 :(得分:1)

cur.execute("SELECT `column1`,`column2` FROM `table`  WHERE `name`=? GROUP BY `column`",(name,) )