WPDataTable SQL Querry Issue

https://wpdatatables.com/

In WPDatatable, we face issues like duplicates of same post come in query if it has multiple categories selected which can be solved with GROUP BY but then not all taxonomy shows in dropdown for filtering, etc.

We need to find a way to querry proper filters without error in data. So get all posts, and posts in multiple categories should still show 1 and categories should properly show in dropdown still.