Link to home
Start Free TrialLog in
Avatar of r3nder
r3nderFlag for United States of America

asked on

getting a start date and end date from different rows MySQL

I have a query, in that query I get the start time and a toolnumber
DROP TABLE IF EXISTS precont;
CREATE TABLE precont AS (
SELECT UploadTime as 'StartTime', ToolNumber
FROM ToolAssemblies
WHERE ControllerSn = 1024);

Open in new window

What I want is to take this:(the query above)
User generated imageAnd make this:(start date is the first date and the enddate is the firstdate of the next record with a new tool number
User generated image
ASKER CERTIFIED SOLUTION
Avatar of Haris Dulic
Haris Dulic
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of r3nder

ASKER

Thanks Samo