From 5c176ccbe06317a394f8abc6cae49a211115f2c8 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 11 Dec 2020 21:30:44 -0800 Subject: [PATCH] If only one distinct value, record that in most_commond and leave least_common as null --- sqlite_utils/db.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index fdb2e92..460cb9a 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -1961,7 +1961,6 @@ class Table(Queryable): "select [{}] from [{}] limit 1".format(column, table) ).fetchone()[0] most_common = [value] - least_common = [value] else: most_common = [ (r[0], r[1])