对于每个VideoName,我想计算Cuepoint列中有多少值的值大于50。
查询的输出示例:
{"VideoName":"TUTORIAL 1","Over50":"21"},
{"VideoName":"TUTORIAL 2","Over50":"23"}...
我还想问一下,是否可以创建一个查询,为每个VideName输出每个Aspect使用了多少次?
查询的输出示例:
{"VideoName":"TUTORIAL 1","Delivery":"2","Speech":"4","Visual aids":8"}...
最后(希望我不会讨厌)是否有可能创建一个查询,以阻止UserId列中的用户使用CommentDate
观看不同的视频?
答案 0 :(得分:0)
第一名:
SELECT VideoName,COUNT(CuePoint) AS TotalCuePointsgreaterthan50
FROM Yourtable
WHERE CuePoint >= 50
GROUP BY VideoName;
第二个:
SELECT VideoName,
Aspect,
COUNT(*) AS Count_per_aspect
FROM Yourtable
GROUP BY VideoName,Aspect;
答案 1 :(得分:0)
对于每个VideoName,我想计算Cuepoint列中有多少值的值大于50。
Select VideoName, SUM(IF(Cuepoint > 50, 1, 0)) Over50 FROM table GROUP BY VideoName;
我还想询问是否可以创建一个查询,为每个VideName输出每个Aspect使用了多少次?
SELECT VideoName, count(*) aspectCount from table GROUP BY VideoName, Aspect;