Testing

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla

Q&A for Joomla! administrators, users, developers and designers

/*
select cast(avg(a.questions) as float)  from (
select datepart(year,creationdate), parentid, count(*) questions from posts where posttypeid = 2 and parentid is not null
and datepart(year,creationdate) >= 2018
group by datepart(year,creationdate), parentid ) a
*/

select datepart(year,creationdate), parentid, count(*) questions from posts where posttypeid = 2 and parentid is not null
and datepart(year,creationdate) <= 2018
group by datepart(year,creationdate), parentid
order by datepart(year,creationdate) desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results