Oracle interview question

reverse the linked list, SQL, Python basics