0

I have a code, which dynamically creates an SQL query based on the selected tables and columns. One of the sample query, which is generated is as following:
SELECT
agr.Name,
agr.Link,
comp1.Name as 'Party 1',
cnt1.Name as 'Party 1 Country',
comp2.Name as 'Party 2',
cnt2.Na...