My application uses a query that is working fine using a MySQL/MariaDB-Database. I did modify my application to be more flexible and work with Microsoft SQL Server too