"Thanks for your reply, it works"By accident! Consider this part of your query:CONVERT(VARCHAR(8), a.TransactionTime, 103) >= '01/04/2015' and CONVERT(VARCHAR(8), a.TransactionTime, 103)<= '28/04/2015'
Now check this:select CONVERT(VARCHAR(8), cast('20000408' as datetime), 103)select CONVERT(VARCHAR(8), cast('20100408' as datetime), 103)select CONVERT(VARCHAR(8), cast('20200408' as datetime), 103)select CONVERT(VARCHAR(8), cast('20300408' as datetime), 103)select CONVERT(VARCHAR(8), cast('20400408' as datetime), 103)
These all produce the same result: 08/04/20go ahead and try it."I want to take the minimum transaction per day."Why didn't you mention that in the first place?Also, please follow the posting guidelines (especially the CREATE TABLE and INSERT INTO statements) and include your sample result