Running a master query and a query of queries
You could use a UNION to run one master query

&lt;cfquery datasource = "XX.XX.X.XX" name="master1"&gt;
SELECT DATE(Timedetail) as FIRSTCONN, COUNT(Timedetail) as FIRSTOccurances, EVENTS 
FROM  MyDatabase
WHERE EVENTS = "FIRST" 
GROUP BY FIRSTCONN
UNION
SELECT DATE(Timedetail) as SECONDCONN, COUNT(Timedetail) as SECONDOccurances, EVENTS 
FROM  MyDatabase
WHERE EVENTS = "SECOND" 
GROUP BY SECONDCONN;
&lt;/cfquery&gt;


and then in your QoQ reference the correct column name

&lt;cfquery dbtype="query" name="detail1"&gt;
SELECT  *
FROM master1 
WHERE FIRSTCONN  &gt;= &lt;cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar"&gt; 
AND FIRSTCONN  &lt;  &lt;cfqueryparam value="#dateAdd('d', 1,form.enddate)#"     cfsqltype="cf_sql_varchar"&gt;
AND EVENTS = 'FIRST';




&lt;cfquery dbtype="query" name="detail2"&gt;
SELECT  *
FROM   master1
WHERE  SECONDCONN  &gt;= &lt;cfqueryparam value="#form.startdate#"     cfsqltype="cf_sql_varchar"&gt; 
AND    SECONDCONN  &lt;  &lt;cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar"&gt;
AND EVENTS = 'SECOND';
&lt;/cfquery&gt;