From: Matteo Nastasi (mop) Date: Mon, 21 Dec 2015 07:09:00 +0000 (+0100) Subject: add constraint on friendship for wideskill view X-Git-Tag: v5.3.0~21 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=e290c557994ea3531ef87bf2f40ad119af6aa970;p=brisk.git add constraint on friendship for wideskill view --- diff --git a/sql/sql.d/075-users-network.sql b/sql/sql.d/075-users-network.sql index a371ec5..a4a9958 100644 --- a/sql/sql.d/075-users-network.sql +++ b/sql/sql.d/075-users-network.sql @@ -41,7 +41,8 @@ DROP VIEW #PFX#usersnet_wideskill; CREATE VIEW #PFX#usersnet_wideskill AS SELECT un.owner, ur.target, SUM(ur.skill * un.trust) / SUM(un.trust) as skill, count(*) as count FROM #PFX#usersnet AS un, #PFX#usersnet AS ur - WHERE un.target = ur.owner AND un.friend >= 4 -- 'un' is, at least, our friend + WHERE un.target = ur.owner AND un.friend >= 4 -- 'un' is, at least, our friend + AND ur.friend > 2 GROUP BY un.owner, ur.target; DROP VIEW #PFX#usersnet_narrowskill;