Postgresql – How to filter a query with a parameter only if it's passed?
I dont want to write two statements like this if(filter_by_company) { query.. } else { query... } So select users and they are in companies and I the admin can filter like by company id. How can I say when…