I suspect you are using UNION because there are actually two different tables in your queries, e.g., table1 and table2. In that case, you should not expect the sum to be the same when the date changes.
Update: I just noticed that you are selecting amt in one query and amt1 in the other, so there is no reason to expect the sums to be the same as the date changes.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers