Is the following query legal in mysql? In other SQLs? Are there any cases where it's unstable or impossible to use CASE statements in arithmetic? Have you had any experience with doing this, any thoughts about efficiency concerns, etc? (This operation will be working with result sets of thousands of records at a time, eventually tens of thousands, but not much more.)Is the following query legal in mysql? In other