AX2012: Remove shared queries

Dear all,
Does anyone know how I can remove a shared query? I found out that I can remove the user queries in the SysLastValue table or Usage data, but the shared queries are still in the menu.

Thanks in advance!

Check this link incase it might be helpful

And this too