Things work together

This commit is contained in:
2015-03-08 22:16:27 +07:00
parent 132a726744
commit 8d45e846ff
3 changed files with 36 additions and 16 deletions
+4 -2
View File
@@ -105,6 +105,7 @@ select
from contribs c
where
c.owner = :org and
c.author = :author and
c.week >= :from and
c.week <= :to
group by item
@@ -119,6 +120,7 @@ select
from contribs c
where
c.owner = :org and
c.author = :author and
c.week >= :from and
c.week <= :to
group by item
@@ -126,7 +128,7 @@ order by week, commits desc`
const repoTopQuery = `
select
%s as item,
c.author as item,
sum(c.commits) as commits,
sum(c.additions) - sum(c.deletions) as delta
from contribs c
@@ -179,7 +181,7 @@ func StatOrgActivity(p map[string]interface{}) (res []StatPoint) {
func StatTeamTop(p map[string]interface{}) (res []StatItem) {
defer measure("StatTeamTop", time.Now())
mustSelectN(&res, fmt.Sprintf(teamTopQuery, p["item"], p["sort"]), p)
mustSelectN(&res, fmt.Sprintf(teamTopQuery, p["item"]), p)
return
}