var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Sum Of count of columns
I need to write a query in mysql that is ,I want to sum all the values those are retrived by Count .
i am writing following query
Select SUM(ReceivedAmt) AS TOTALAMOUNT, count(TID0) AS ITEM1,count(TID0) AS ITEM2 ,Sum(ITEM1 +ITEM2 )AS Items from tbldiagnostics where date(TOT)='2014-07-07';
Please help me
Thanks & Regards,
do you mean?
seems a little odd adding the same value to itself and to count the same value twice, I will give you the benefit of the doubt and say you just have a typo.
count(TID0) AS ITEM1,count(TID0) AS ITEM2 ,count(TID0) +count(TID0) AS Items
Thanks for reply,I got answer