There is a table injections
there is a select request
I need to make it so that if date is the previous month, then estimate_usage_rate = usage_rate otherwise just injections.estimate_usage_rate as estimate_usage_rate
sketched until such a pseudocode
IF(DATE_FORMAT(injections.date,'%Y-%m') == CONCAT(EXTRACT(YEAR FROM NOW()), '-', EXTRACT(MONTH FROM NOW( ) ) -1, '%' )) THEN estimate_usage_rate = usage_rate ELSE injections.estimate_usage_rate as estimate_usage_rate END IF; 
injections.estimate_usage_rate as estimate_usage_rateis called columns in queries, but if / end_if it is clearly not appropriate - Mikeextract(year_month from injections.date)=extract(year_month from now()-interval 1 month)but what is AS, what should I do, I can’t imagine - Mikecase when extract..=eaxtract then usage_rate else injections.estimate_usage_rate end as estimate_usage_rate- Mike