I am trying to get the data from a table and adding to that the result of another query both those things have ids and names in common.
Here is the query :
=query(Calculation!A1:G," select G,count(A) group by G")
I would like to make a new query that would include this one. Something like this "QueryResult.id" is the G from the query and "Talents" is the sheet to join to it :
SELECT A, B, C, D, E, F, G FROM Talents left join QueryResult ON Talents.id = QueryResult.id
The issue is that no join in google query language.
I though of maybe making a join with some google script but it seems to complicated for a simple operation like this.
The end goal here is to have a list of all talents and the amount of aptitudes in common that the person have with them.
Can't you just VLookup the result of the query in the talents sheet? The ID rows of the query are unique, so it shouldn't pose any problem.
If you want a true left join regardless the short answer is that there is no quick way to do this.
I have a project running which supplies a front end to a JS Object interaction library I wrote.
The front end itself is still in very much in development but joins and aggregations are working although the semantics and output are subject to change.
When you pasted everything into a script in your spreadsheet you'd write something like this given the current state of the project.
I named the fields in Skills F1 through F7
=
TABLE_RENAME(
TABLE_SELECT(
TABLE_JOIN(
Talents!A:G,
TABLE_AGG(Calculation!A1:G, "F7", "count", "n", "F1"),
"left", "ID", "F7"),
{"l.Talent", "l.Tier", "l.ID", "r.n"}),
{"Talent", "Tier", "ID", "n"})