mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-26 10:54:32 +02:00
Make least_common/most_common order dependable for tests
This commit is contained in:
parent
5a813bae6d
commit
95a966bb62
2 changed files with 6 additions and 6 deletions
|
|
@ -1979,8 +1979,8 @@ class Table(Queryable):
|
|||
most_common = [
|
||||
(truncate(r[0]), r[1])
|
||||
for r in db.execute(
|
||||
"select [{}], count(*) from [{}] group by [{}] order by count(*) desc limit {}".format(
|
||||
column, table, column, common_limit
|
||||
"select [{}], count(*) from [{}] group by [{}] order by count(*) desc, [{}] limit {}".format(
|
||||
column, table, column, column, common_limit
|
||||
)
|
||||
).fetchall()
|
||||
]
|
||||
|
|
@ -1992,8 +1992,8 @@ class Table(Queryable):
|
|||
least_common = [
|
||||
(truncate(r[0]), r[1])
|
||||
for r in db.execute(
|
||||
"select [{}], count(*) from [{}] group by [{}] order by count(*) limit {}".format(
|
||||
column, table, column, common_limit
|
||||
"select [{}], count(*) from [{}] group by [{}] order by count(*), [{}] desc limit {}".format(
|
||||
column, table, column, column, common_limit
|
||||
)
|
||||
).fetchall()
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue