how have operation mysql statement?
i'm perplexing name calculates associate payouts.
my proceed graceful simple.
select
month(payments.timestmap)
,sum(if(payments.amount>=29.95,4,0)) tier4
,sum(if(payments.amount>=24.95<=29.94,3,0)) tier3
,sum(if(payments.amount>=19.95<=24.94,2,0)) tier2
from payments
group month(payments.timestamp)
the above does work since mysql evaluating second biased condition. btw does means syntax blunder name relapse results.
before above i attempted i presumption work "amount between 24.94 29.94
" caused an error. following i attempted "amount >= 24.94 <= 29.94
"
so illusory have operation comparison controlling mysql?
Comments
Post a Comment