The job is actually with Commerce. I don't think we are allowed to provide the query here, but you can contact developer support service for further assistance.
it was a stored procedure but it was dropped as a SP can only work on the db it is defined. Now it's inlined in code.
I keep seeing suggestions to run the Maintain Database Indexes job stored procedure in SSMS if you have issues with the job completing successfully. I have not seen the name of that proc mentioned anywhere. Does anyone know which proc it runs for this job?