The issue you're facing with the Query JSON with SQL is likely due to the way the JSON data is structured and interpreted. When you perform a join in a JSON query, the result might default to grouping by keys unless explicitly handled
Inspect Your JSON Structure :
Ensure that the structure of {{ p6_activities.data }} and {{ Project.data }} is
compatible for a join. For example:
{{ p6_activities.data }} should contain a field like c_proj_id.
{{ Project.data }} should contain a field like p6project.
SELECT
a.activity_id,
a.activity_name,
b.project_id,
b.project_name
FROM
{{ p6_activities.data }} a
JOIN
{{ Project.data }} b
ON
a.c_proj_id = b.p6project