I have such data in my table :
rcountID(int(11))-----rcountName(varchar(255))
1--------------------89-000011
2--------------------89-000012
3--------------------89-000013
in above table rcountID is primary key and rcountNumber is unique key .
I wrote query to get maximum value of rcountID but final result shows me all available data :
SELECT MAX(ym_receipt_counter.rcountID) AS maximum,
ym_receipt_counter.rcountNumber
From ym_receipt_counter
GROUP BY ym_receipt_counter.rcountID;
also this one doesn`t work :
SELECT MAX(ym_receipt_counter.rcountName) AS maximum,
ym_receipt_counter.rcountID
From ym_receipt_counter
GROUP BY ym_receipt_counter.rcountID;
Im confused , what
s wrong ?