SQLite Forum

Can this simple query be optimized?
Ryan, just to be clear, SQLite's handling of min() and max() is _not_ fully deterministic. In the case that Keith pointed out, where there is more than one row with a max or a min, you don't know which row will be picked to satisfy the x.