Skip to end of metadata
Go to start of metadata
You are viewing an old version of this content. View the current version.
Compare with Current
View Version History
Version 1
Next »

SELECT
floor(created to day) creationday,
max(CHAR_LENGTH(body)) maxcommentlength,
avg(CHAR_LENGTH(body)) avgcommentlength,
min(CHAR_LENGTH(body)) mincommentlength
FROM
CORE.comments
GROUP BY
floor(created to day)


{
"type": "line",
"x": "X",
"y": "Y",
"color":"C",
"plugins": [
{
"name": "tooltip"
},
{
"name": "legend"
},
{
"name": "export-to"
}
]
}
data => data.reduce((acc, curr)=>[
...acc,
{X: curr.creationday, Y: curr.maxcommentlength, C: 'max'},
{X: curr.creationday, Y: curr.mincommentlength, C: 'min'},
{X: curr.creationday, Y: curr.avgcommentlength, C: 'avg'}
], [])