Am 26/11/2015 um 17:27 schrieb Mitchell Joblin:
- The aggregation is computed across all mailing lists for
a single project and organized by developer global ids
Signed-off-by: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
---
codeface/R/query.r | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/codeface/R/query.r b/codeface/R/query.r
index 68fe018..5f9e72b 100644
--- a/codeface/R/query.r
+++ b/codeface/R/query.r
@@ -566,6 +566,21 @@ query.mail.edgelist <- function(con, pid, start.date,
end.date) {
return(dat)
}
+## Compute the number messages each author generated across all mailing lists
+## for a single project
+query.author.mail.count <- function(con, pid, start.date, end.date) {
+ query <- str_c("SELECT author, COUNT(*) as freq",
+ "FROM mail",
+ "WHERE projectId=", pid,
+ "AND creationDate >=", sq(start.date),
+ "AND creationDate <", sq(end.date),
+ "GROUP BY author", sep=" ")
+
+ dat <- dbGetQuery(con, query)
+
+ return(dat)
+}
+
## Distributions for commit statistics
query.contributions.stats.range <- function(con, range.id, include.id=FALSE)
{
if (include.id) {