Person Posted May 4, 2007 Share Posted May 4, 2007 whats wrong with this query? SELECT user, sum(imps) AS imps, sum(clicks) AS clicks, sum(clientrev) AS clientrev FROM nuke_pnAffiliate_unauditedstats WHERE `date` = '20070418' AND sid like '%rpu%' AND user IN (SELECT DISTINCT(cl) FROM rpu_sales WHERE salesman = 'ryan') GROUP BY client ORDER BY clientrev DESC; thanks Quote Link to comment Share on other sites More sharing options...
btherl Posted May 4, 2007 Share Posted May 4, 2007 Can you show us the error from mysql rather than making us guess? Quote Link to comment Share on other sites More sharing options...
btherl Posted May 4, 2007 Share Posted May 4, 2007 Without knowing your table structure and the purpose of the query, the only odd thing I notice is that you select user, but you group by client. Normally you will select the column you group by. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.