Can anyone please explain why this first query works and returns the expected data, while the second one only returns a subset (and quite small) of the expected data.
This one works..
select trans_type,prod_id,sub_prod_id,sum(credits) as credits,
FROM_UNIXTIME(timestamp,'%Y-%m-%d') as summary_date, user_no
from transact_m
where user_no = '18932' and
FROM_UNIXTIME(timestamp,'%Y-%m-%d') > FROM_UNIXTIME(0,'%Y-%m-%d') and
FROM_UNIXTIME(timestamp,'%Y-%m-%d') < FROM_UNIXTIME(1046728800,'%Y-%m-%d')
group by trans_type,
prod_id,
sub_prod_id,
FROM_UNIXTIME(timestamp,'%Y-%m-%d')
order by timestamp;
This one doesnt....
select trans_type,prod_id,sub_prod_id,sum(credits) as credits, FROM_UNIXTIME(timestamp,'%Y-%m-%d') as summary_date, user_no from transact_m where user_no = '18932' and timestamp > 0 and timestamp < 1046728800 group by trans_type, prod_id, sub_prod_id, FROM_UNIXTIME(timestamp,'%Y-%m-%d') order by timestamp;
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php