summaryrefslogtreecommitdiff
path: root/gentoobrowse/views/popular.xml
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse/views/popular.xml')
-rw-r--r--gentoobrowse/views/popular.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/gentoobrowse/views/popular.xml b/gentoobrowse/views/popular.xml
new file mode 100644
index 0000000..873805a
--- /dev/null
+++ b/gentoobrowse/views/popular.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<block xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:project2="http://project2.randomdan.homeip.net">
+ <xi:include href="../datasources/postgres-web.xml" />
+ <project2:sqlview name="packages" recordname="package" datasource="postgres-web">
+ <sql>
+ SELECT p.packageid, MIN(c.name) AS catname, MIN(p.name) AS pkgname, MIN(p.description) AS description
+ FROM user_packages up, packages p, categories c
+ WHERE up.packageid = p.packageid
+ AND p.categoryid = c.categoryid
+ GROUP BY p.packageid
+ ORDER BY COUNT(*), MIN(c.name), MIN(p.name)
+ LIMIT 50
+ </sql>
+ </project2:sqlview>
+</block>