summaryrefslogtreecommitdiffstats
path: root/atuin-client
diff options
context:
space:
mode:
Diffstat (limited to 'atuin-client')
-rw-r--r--atuin-client/src/database.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs
index e61d6ed7f..19fccb0c0 100644
--- a/atuin-client/src/database.rs
+++ b/atuin-client/src/database.rs
@@ -306,10 +306,7 @@ impl Database for Sqlite {
}
if unique {
- query.and_where_eq(
- "timestamp",
- "(select max(timestamp) from history where h.command = history.command)",
- );
+ query.group_by("command").having("max(timestamp)");
}
if let Some(max) = max {