import sqlite3


def create_statistic():
    conn = sqlite3.connect("db.sql")
    cur = conn.cursor()
    # result = cur.execute("SELECT * FROM statistic")
    # data = cur.execute("select (select count(user_name) from statistic) as count, * from statistic")
    data = cur.execute("select count(user_id), user_id from statistic")
    # for i in data:
    #     print(i[1])
    #     print(cur.execute("SELECT * FROM statistic WHERE user_id=?", (i[1], )))
    # users = []
    # for i in result:
    #     if i[5] in users:
    #         print(1)
    #         users[users.index(i[5])] += users[users.index(i[5])]
    #     else:
    #         users.append([i[5], 1])
    return data
