select q.id as id, '11' as type_id, q.title as 'short_des...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla Meta

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

select q.id as id, '11' as type_id, q.title as 'short_desc', '11' as owner_id,
q.creationdate as create_date, isnull(q.lasteditdate,q.creationdate) as update_date,
'34' as status_id, 'T' as content_type, '0' as org_id
from
(SELECT
  id, title,creationdate, lasteditdate
FROM
  Posts
WHERE
  PostTypeId = 1
) q
INNER JOIN
(SELECT  
  COUNT(*) AS answers,
  parentid
FROM
  Posts
WHERE
  PostTypeId = 2
group by parentid
) a
on q.id = a.parentid
where
q.creationdate between '01/01/2011' and '07/05/2011'
and a.answers > 0
order by id

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results