sqlite - SQL conditionally select different aggergates -


Assuming I have a table T , which has one attribute, A , an integer

I return SQL query MAX (T) + 1 if T is a 5 and maximum (t) + 2 If not it?

  select MAX (A) + case when (choose from one (in 5)) Then some T     as 1 ELSE 2 END with max_plus_

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -