This one has me stumpped.
I have 2 tables as so:
METERS
id | startTime
READINGS
id | meter_id | readingTime
What I want to do is update the meters.startTime
to the lowest matching readings.readingTime
in 1 sql query.
How do I do this?
This one has me stumpped.
I have 2 tables as so:
METERS
id | startTime
READINGS
id | meter_id | readingTime
What I want to do is update the meters.startTime
to the lowest matching readings.readingTime
in 1 sql query.
How do I do this?
Like this: