Need support for advanced sql

Job ID: 35238194

Budget: ₹75,000 – ₹150,000 INR

I am looking for someone who can help me for a year. I will be paying you monthly. To consider you as a candidate, you should be able to solve the following
source creationtime state_key_pulled
16638324 2022-10-04 09:59:31.494 0.0
16638324 2022-10-04 09:59:36.505 0.0
16638324 2022-10-04 09:59:38.506 0.0
16638324 2022-10-04 09:59:39.505 1.0
16638324 2022-10-04 10:06:40.530 0.0
16638324 2022-10-04 10:07:53.512 0.0
16638324 2022-10-04 10:08:11.514 0.0
16638324 2022-10-04 10:08:57.502 0.0
16638324 2022-10-04 10:08:58.502 0.0
16638324 2022-10-04 10:09:01.543 1.0
16638324 2022-10-04 10:09:02.521 0.0
16638324 2022-10-04 10:09:04.522 0.0
16638324 2022-10-04 10:09:05.491 0.0
16638324 2022-10-04 10:09:10.491 0.0
16638324 2022-10-04 10:09:11.512 0.0
16638324 2022-10-04 10:09:13.520 0.0
16638324 2022-10-04 10:09:14.502 0.0
16638324 2022-10-04 10:09:15.492 0.0
16638324 2022-10-04 10:09:16.511 0.0
16638324 2022-10-04 10:09:19.402 1.0
16638324 2022-10-04 10:09:48.481 0.0
16638324 2022-10-04 10:09:49.491 0.0
16638324 2022-10-04 10:09:53.414 0.0
16638324 2022-10-04 10:09:54.495 0.0
16638324 2022-10-04 10:09:55.391 0.0
16638324 2022-10-04 10:09:56.528 1.0
I need you to write a sql code to identify the sessions

output should be as follows
source creationtime state_key_pulled Session
16638324 2022-10-04 09:59:31.494 0.0 Session1start
16638324 2022-10-04 09:59:39.505 1.0 Session1end
16638324 2022-10-04 10:06:40.530 0.0 Session2start
16638324 2022-10-04 10:09:01.543 1.0 Session2end
16638324 2022-10-04 10:09:02.521 0.0 Session3start
16638324 2022-10-04 10:09:19.402 1.0 Session3end
16638324 2022-10-04 10:09:48.481 0.0 Session4start
16638324 2022-10-04 10:09:56.528 1.0 Session4end