Q: SQL MAX datetime - 1 day I want to do a comparison between two dates. The highest date (currently via MAX datetime) is working, but I can't get the day after the highest date to compare the data with. 
I'm using the following to get the data of the highest available date:
SELECT `datetime`, `standardSubscriptionDuration`,
SUM(`activeStandardPriceSubscriptions`) AS OneMonthActiveStandard
FROM `Subscription_totals`
WHERE `standardSubscriptionDuration` = '1 Month'
AND `datetime` = (SELECT MAX(`datetime`) AS Date FROM `Subscription_totals`)";

I already tried:
(SELECT MAX(`datetime`) -1 AS Date

But this won't give the result. How am I able to get the data of yesterday and eventually compare them?

A: I think that you want the following date arithmetics:
WHERE 
    `standardSubscriptionDuration` = '1 Month' 
    AND `datetime` = (
            SELECT MAX(`datetime`) - interval 1 day AS Date FROM `Subscription_totals`
    )

