On Thu, Nov 26, 2015 at 6:43 PM, Wolfgang Mauerer
<wolfgang.mauerer@xxxxxxxxxxxxxxxxx> wrote:
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=" ")
looks good to me. For the sake of consistency: We don't use sep=" "
in any other query, but integrate the necessary spaces directly into
the string constants.
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
Thanks, Wolfgang
+
+ dat <- dbGetQuery(con, query)
+
+ return(dat)
+}
+
## Distributions for commit statistics
query.contributions.stats.range <- function(con, range.id,
include.id=FALSE) {
if (include.id) {