From aaee48294adbd81245d1c22bf0acbd5cd447ec89 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 25 Feb 2013 11:49:27 +0100 Subject: README: another interesting query --- README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README b/README index aff9868..5d539e4 100644 --- a/README +++ b/README @@ -21,6 +21,8 @@ Import a full mirror:: Viewing the results ------------------- Run `./webapp.py` and enjoy a webinterface at `0.0.0.0:8800` or inspect the -SQL database by hand. Example query: +SQL database by hand. Example queries: SELECT a.package, a.filename, b.package, b.filename, a.size FROM content AS a JOIN content AS b ON a.hash = b.hash WHERE (a.package != b.package OR a.filename != b.filename) ORDER BY a.size DESC LIMIT 100; + + SELECT hash, sum(size)-min(size), count(*), count(distinct package) FROM content GROUP BY hash ORDER BY sum(size)-min(size) DESC LIMIT 100; -- cgit v1.2.3