As explained below we can work around most issues raised. And here is the customising to run in ubiquitous TeXworks (TeXstudio in detail below).

SageMaths is developed to run with a customised version of Python currently undergoing changes from version 2.7 to 3.x.
SageTex is not provided as a package in Tex Live but is supplied by MiKTeX. Normally if a package is available via the TeX package manager you are encouraged to use it in preference to download from CTAN.
SageTex recommends (in fact requires) that the compatible version dependant .sty is obtained from within SageMaths for that reason you will need to find and copy D:\Programme\SageMath 8.6\runtime\opt\sagemath-8.6\local\share\texmf\tex\latex\sagetex\sagetex.sty to your working folder. This should prevent MiKTeX from using its incompatible version. (alternatively uninstall the MiKTeX version and add the TDS compliant folder D:\Programme\SageMath 8.6\runtime\opt\sagemath-8.6\local\share\texmf in MiKTeX or copy the texmf\tex folder contents to either your local or system texmf\tex)
This is just step one of many pitfalls I encountered. So now you can compile the example or one of your own files with the version that will work with "SageMath 8.6" (note this issue has dogged SageTeX with every version update and is aggravated by having a space in between)
Whilst mentioning spaces POSIX will accept escaped spaces such as '\ ' however in the hybrid calls between windows and POSIX through Cygwin using "/program\ files/" would cause windows to choke so it would be easier to use DOS style short filenames such as c:\progra~1\sagema~1\ etc. however that's not necessary in this case since the application is in D:\path\with\no\spaces.
That raises the next issue which is that Cygwin expects when crossing drives to have a prefix /cygdrive/c for drive c: and /cygdrive/d for d:
However by trimming the commands to the bone I eventually dropped all such problems
For all the above reasons, and more, the simple task of calling
sage example.sagetex.sage requires scripting behind the scenes, it would be oh so easy if there was simply a sage.exe to transmute all those problems. so what have I learnt over the weeks of investigation.
1) SageMath is wrapped in layers of wrappers and a law unto itself
2) Prior to installing make a c:\sage\work\ and when asked where your user HOME is then point to that folder.
3) Install sagemath into a directory with no version name (thus no spaces) e.g. c:\sage\app\
Here is your answer, In your case first ensure D:\Programme\SageMath 8.6\runtime\bin is on your path e.g. if running from a temporary command line or in a .cmd file add
set path=D:\Programme\SageMath 8.6\runtime\bin;%path%
do the first pdfLaTeX run (with the correct sty in the folder)
either copy or move example.sagetex.sage to your "HOME" directory probably in your case c:\users\yourname then you can simply run
bash -l /opt/sagemath-8.6/sage 'example.sagetex.sage'
IT SHOULD WORK ! and you will find
example.sagetex.scmd
example.sagetex.sout
example.sagetex.sage.py
E2.sobj
and a folder called
sage-plots-for-example.tex (with 15 items)
all these need to be moved to wherever you wish to second run pdfLaTeX i.e. where your original aux and pdf files are after second run you get the expected results.
Final Cut
To avoid all that messing about we need a minimal script as below, call it any name you like but I called it sage.cmd and placed it in the bin directory D:\Programme\SageMath 8.6\runtime\bin.
The PATH is the ONLY exception to the rule of NO spaces
The following script will not work if your .tex is down a path with spaces, Be Warned
Save as Sage.cmd
:: IF this directory is already on path you don't need the next line
@set path=D:\Programme\SageMath 8.6\runtime\bin;%path%
:: This next line is essential to temporarily correct the directory misdirection
:: but has the side effect of rebuilding a temporary dot sage subdirectory
@set HOME=%~dp1
:: This next line does the donkey work
bash -l /opt/sagemath-8.6/sage '%~n1.sagetex.sage'
:: the following command is optional if you want to delete .sage then remove the ::
:: rmdir /S /Q %~dp1.sage
Inside TeXstudio add a user command to the file (you could also add the pdfLaTeX run before and after)
"D:/Programme/SageMath 8.6/runtime/bin/sage.cmd" "?am"

I forgot to mention that if you now have sage.cmd as suggested within sage...\bin on system path then the command for the editor can be simply sage "?am" (at worst sage.cmd "?am")
Also you could have a desktop shortcut pointing to the sage.cmd with a "%1" at the end it will allow you to drag and drop a filename.sagetex.sage file for processing
If you want a .cmd or .bat (they are basically both the same) file to automatically run a tex file through all compiles you can have for example one called say SageRunner.cmd (or.bat)
PdfLaTeX your usual options (e.g. synctex) "%1"
Sage "%~dpn1"
PdfLaTeX your usual options "%1"
That should work if you simply drag and drop the filename.tex onto it
I have used "..." in most commands to allow for spaces in the "file name" however there are some places that the call via BaSh (Bourne Shell) would stumble so to make it the simplest (dirty) solution I had to forgo scripting for all drive switching and associated filename syntax checking.
sage.exeshould work. Also, how do you 'open the sage console' exactly? The command you use for that should also work for the TeXStudio compile command sequence. As in the linked question, you could also write a batch (.bat) file that performs the sequence of steps and call that file from TeXStudio. – Marijn Feb 02 '19 at 04:39"<path>\SageMath 8.6\runtime\bin\mintty.exe" -t 'SageMath 8.6 Shell' -i sagemath.ico /bin/bash --login -c '/opt/sagemath-8.6/sage -sh'and typesagethere. I tried using the executableminttybut this did not work. Also I did not find any executable namedsage. Unfortunately I don't know enough to write a batch file and call that, so I would also need help for this (and would still be interested how to get that to work without batch file). – Martin Feb 02 '19 at 09:18-t 'SageMath 8.6 Shell'and thei- sagemath.icowhich set the title and the icon for the terminal window) with or without the--loginand probably without the-shand addsage %.sagetex.sageat the end - maybe you need to play around a bit to find the correct configuration options. – Marijn Feb 02 '19 at 16:39"<path>\SageMath 8.6\runtime\bin\mintty.exe" /bin/bash --login -c '/opt/sagemath-8.6/sage -sh 'sage %.sagetex.sageopens sage in the console, but nothing happens (if I omit--loginand/or-shthe console just opens for a short time and closes again). – Martin Feb 02 '19 at 17:16;sleep 5after the sage command to pause the console for 5 seconds so you can see what is happening before it closes? – Marijn Feb 02 '19 at 22:00-shI get (for a very brief time) the messagepython2: can't open file 'sage': [Errno 2] No such file or directory(and the sage title is not visible in the console so it seems sage does not even get started). – Martin Feb 03 '19 at 19:20D:\Programme\SageMath 8.6\runtime\bin\mintty.exe– Martin Feb 17 '19 at 21:32