I want to query a table paths with 5 columns (user, trial , t, x, y) to get user, trial and t where first condition: x*x+y*y<100 and second condition: t has the max value.
I solved only the half of the problem, implemented the first condition:
query = '''
SELECT user, trial , t,
FROM paths
WHERE x*x+y*y<100
'''
Got this: enter image description here
I must add the second condition such as only the user + trial with max value for t should be selected. Example: row 1226 5 2.348045
Please help me to find a solution. Thank you!
[python] [sqlite3] multiple WHEREthas the max value" means. Could you explain? Istgreater thanxandy, greater thanuserortrial?