Is it possible to get the count() from multiple tables in a single select 
statement?  I want to do something like this to return the count() in each 
of the related tables. Eventually, if possible I would like to do a couple 
more aggregate functions on these related tables.

<cfquery datasource="#datasource#"  name="campaign_overview">
select count(op.id),count(link.id)
from lfemail_campaign AS c JOIN lfemail_log_openrate op ON 
c.campaignID=op.campaignID
        JOIN lfemail_log_link AS link ON c.campaignID=link.campaignID
where c.campaignID=#client.campaignID#
</cfquery>

Is this possible? As soon as I add the second join clause, the count is 
oncorrect. Any ideas?

Brook Davies


______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to