Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hola a todos,
Estoy intentando hacer una inner Join entre dos tablas y agrupar después el resultado:
Usuario:
LOAD Id as IDUsuario__c,
Username;
SQL SELECT Id,
Username,
FROM User;
Inner Join (Usuario)
Comentario:
LOAD CreatedById as IDUsuario__c,
Count(Id) as Num;
SQL SELECT CreatedById,
Id
FROM UserFeed
Group By CreatedById;
Me dice que agrupe también por el Id de la tabla Comentario, pero si pongo Group By CreatedById,Id tampoco funciona. No sé porqué no me salen datos.
Podéis ayudarme?
Gracias
César
Comentario:
LOAD CreatedById as IDUsuario__c,
Num;
SQL SELECT
Id,
Count(Id) as Num
FROM UserFeed
Group By Id;
Hi Gysbert,
Your answer don't work. The error says:
ERROR at Row:3:Column:20
unexpected token: as
Thanks,
César
Maybe like this:
Comentario:
LOAD CreatedById as IDUsuario__c,
Num;
SQL SELECT
CreatedById,
Count(Id) as Num
FROM UserFeed
Group By CreatedById;
It's not entirely clear to me if you have a CreatedById and an Id field or both in your UserFeed table.
Hi,
I have both in the table. The CreatedById field is the one that show who has created a comment. And I want to use the Id field to count how many comments has been posted by each person.
The same error still appears.
Thanks
Hmm, your database doesn't understand the as keyword? That's a bit weird.
Comentario:
LOAD CreatedById as IDUsuario__c,
Num;
SQL SELECT
CreatedById,
Count(Id) Num
FROM UserFeed
Group By CreatedById;
But in the rest of the script understands
It could be because I'm connected to Salesforce?
Remove SQL from "SQL SELECT" and try.
Remove SQL from "SQL SELECT" and try.