Answer the question
In order to leave comments, you need to log in
WHERE in SELECT SQL?
There is a request like this:
SELECT `money` FROM `table` WHERE date(`date`) = '2016-08-11'
Answer the question
In order to leave comments, you need to log in
SELECT [Поле группировки], sum(что сложить) FROM `table`
WHERE <условие>
group by [Поле группировки]
SELECT [Поле группировки], sum(что сложить) FROM `table`
group by [Поле группировки]
having [условие]
SELECT `money` FROM `table`
WHERE date(`date`) BETWEEN вчера AND сегодня
SELECT `money` AS Today, CAST( NULL AS MONEY) AS Yesterday FROM `table` WHERE date(`date`) = '2016-08-11'
UNION
SELECT NULL, `money` FROM `table` WHERE date(`date`) = '2016-08-10'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question