Is their anyway you can do this without using a temp table?
$A == # of rows returned when GROUP BY referrers.keywords (i.e. every occurance in db with above criteria is a click)
$B == all in $A which have a transactions.stoneage_ID > 48 AND transactions.year > 2000
$C == all in $A which have a transactions.stoneage_ID = 48 AND transactions.year > 2000
$D == all in $A which have a transactions.stoneage_ID > 48 AND transactions.year < 2001
$E == all in $A which have a transactions.stoneage_ID = 0 AND transactions.year < 2001
$F == ($B+$D)/$A
$G == $F*7
I know it will be easier to use a temp table to store the results from $a the run the rest but I was wondering if you could build one query on that.
Steve
$A == # of rows returned when GROUP BY referrers.keywords (i.e. every occurance in db with above criteria is a click)
$B == all in $A which have a transactions.stoneage_ID > 48 AND transactions.year > 2000
$C == all in $A which have a transactions.stoneage_ID = 48 AND transactions.year > 2000
$D == all in $A which have a transactions.stoneage_ID > 48 AND transactions.year < 2001
$E == all in $A which have a transactions.stoneage_ID = 0 AND transactions.year < 2001
$F == ($B+$D)/$A
$G == $F*7
I know it will be easier to use a temp table to store the results from $a the run the rest but I was wondering if you could build one query on that.
Steve