-
This commit is contained in:
parent
050c1e9a27
commit
ba2103da9e
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
SELECT site, ROUND(AVG(time), 2) AS "average time", COUNT(*) AS "# of Q"
|
SELECT RANK() OVER(ORDER BY AVG(time)),
|
||||||
|
site, ROUND(AVG(time), 2) AS "average time", COUNT(*) AS "# of Q"
|
||||||
FROM (
|
FROM (
|
||||||
SELECT site, question, SUM(CASE
|
SELECT site, question, SUM(CASE
|
||||||
WHEN timestamp BETWEEN '2018-11-02 18:36:00' AND '2018-11-05 05:30:00'
|
WHEN timestamp BETWEEN '2018-11-02 18:36:00' AND '2018-11-05 05:30:00'
|
||||||
|
@ -9,4 +10,4 @@
|
||||||
GROUP BY site, question
|
GROUP BY site, question
|
||||||
ORDER BY COUNT(*) DESC
|
ORDER BY COUNT(*) DESC
|
||||||
) AS subquery GROUP BY site
|
) AS subquery GROUP BY site
|
||||||
ORDER BY AVG(time) DESC
|
ORDER BY AVG(time) DESC
|
Loading…
Reference in a new issue