> What version of SQLite are you using? I'm using the 3.5.7 version that > came > with OS X 10.5, and I get -2 as expected.
I'm using 3.3.5, I'll get the latest and see if works there or not in a few minutes. > Also, what's with the superfluous subquery? Why not just say > > SELECT max(Data) FROM test_table WHERE ExternalID=2; > > You can even do min and max at the same time: > > SELECT min(Data), max(Data) FROM test_table WHERE ExternalID=2; Yes, that query is a remnant of things I tried, because I couldn't get the values to return as expected. Your second query looks perfect for my needs, thanks! Dennis _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users