Replace the window regulator
My 89 used to do the same thing. I just cleaned the temp sensor on the top of the motor, they usually get a lot of corrosion on them.
Valve lifter could be sticking. Take the valve cover off and start the engine. You can narrow down which one it is. Might Not be sticking and just need adjusting.
The window will often fall down on a 2001 Nissan Xterra due to a faulty drive motor. This causes the tension that holds the window in place to release.
More than likely it is your switch or a short in the wires, if the motor was going it would not work part of the time. I would say 95% it is the switch. Look for a part for this replacement on line , my guess about $50.
Open your hood look down to left see fuse box above battery, voila its in there.
look straight down past the place where you pour brake fluid in, that thing with the wire coming out is your O2 sensor
If by " rolls down all by itself" you mean that it slowly slides down while traveling in the car, then my advice would be to take the door panel off and check to see if the window came off the the lower clips. If every thing looks sound and or the window is electronicly rolling itself down I don't know what to tell you.
look down from the passenger front wheel toward the left its bolted to the transmission, usually gold in color, and has fat wires coming out of it.
bad window motor have it replaced.
Based on symptom: switch or motpr Based on Nissan: switch Replace Nissan window switches frequently lest you be caught open in the rain.
I would suspect that the clutch slave cylinder is bad. Follow the line down from where you added fluid to find the slave cylinder. After replacing the slave unit you will need to bleed the system then it will work fine again. Mark
You need to adjust the strike further in towards the interior. It has 2 screws that hold the strike down loosen them and move the strike.