Sqlite - Return All Columns For Max Of One Column Without Repeats
Im using Python to query a SQL database. I'm fairly new with databases. I've tried looking up this question, but I can't find a similar enough question to get the right answer. I h
Solution 1:
In SQLite 3.7.11 or later, you can just retrieve all columns together with the maximum value:
SELECT*, max(f) FROM cbar;
But your Python might be too old. In the general case, you can sort the table by that column, and then just read the first row:
SELECT*FROM cbar ORDERBY f DESC LIMIT 1;
Post a Comment for "Sqlite - Return All Columns For Max Of One Column Without Repeats"