def count_distinct_col(curs, table_name, col='y'):
    """Queries to find number of distinct values of col column in table in
    database.

    Args:
        curs (sqlite3.Cursor): cursor to database
        table_name (str): name of table to query
        col (str): name of column to find number of distinct values for
    Returns:
        (int) number of distinct values for col"""
    return curs.execute("""SELECT COUNT(DISTINCT {})
    FROM {};""".format(col, table_name)).fetchone()[0]