Skip to main content
April 9, 2008
Question

select count()

  • April 9, 2008
  • 1 reply
  • 306 views
Is it possible to get the count() for "forums, "threads" and "messages" extrapolating from the following query? Thanx for helping a newb.

select
sf_conferences.id,
sf_conferences.name
from
((#variables.tableprefix#conferences
left JOIN sf_forums ON sf_conferences.id=sf_forums.conferenceidfk)
left JOIN sf_threads ON sf_forums.id = sf_threads.forumidfk)
left JOIN sf_messages ON sf_threads.id = sf_messages.threadidfk
GROUP BY
sf_conferences.id,
sf_conferences.name
This topic has been closed for replies.

1 reply

Inspiring
April 9, 2008
Select one field from those three tables. The smaller the better. Make sure you add them to your group by clause as well.

Then run 3 Query of Queries to find the number of records where those fields have values greater than an empty string.