HI
I am running mysql 5.0.51a and have a table with the following structure
ID, Date, startTime, stopTime, Name
I want to find the last stopTime from yesterday for each name and the first startTime from today for each name.
I have tried using union but end up with a stopTmes for today and yesterday as well as the startTimes for today and yesterday for each name. I also tried using sub queries but get an error as there is more than one result for each query.
How can I create a query to just get the the yesterdays stop time and todays start time only for each name.
Thanks in advance for your help.
Regards
Richard
I am running mysql 5.0.51a and have a table with the following structure
ID, Date, startTime, stopTime, Name
I want to find the last stopTime from yesterday for each name and the first startTime from today for each name.
I have tried using union but end up with a stopTmes for today and yesterday as well as the startTimes for today and yesterday for each name. I also tried using sub queries but get an error as there is more than one result for each query.
How can I create a query to just get the the yesterdays stop time and todays start time only for each name.
Thanks in advance for your help.
Regards
Richard
Comment