Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

adding two columns

Hi all,

I have two tables signupactivity and useractivity.

I have used signupactivity table in other sheets. Now i need to add a new table useractivity for new sheet.

One of the field from signupactivity i.e referrer_email_type_id which has the information about email_type_id.

In the same way "status" field from useractivity table has the information about email_type_id.

For example: if referrer_email_type_id  has info about email_type_id(44,45,46,47) and

status has info about email_type_id(2,3,4,8).

Now i need to add the both the columns into single column.

I used join, concatenate it din't worked.

The issue is signupactivity  is using invitation_id has association key to link with other table.

This invitation_id  is not in useractivity table. I have user_id in useractivity table.

when i used "join" between these to table i am getting sync error or circular reference error.


(I need to create a "Pivot table" which displays the count of email_type_id in a column. which can be filtered on client basis.)

Please anyone help on this where i need to add both the above columns and table.

I think this is clear, if not please ask.

Thanks,

Pramod

10 Replies
Not applicable
Author

Please check the code

LOAD `user_id`,

    client_id,

    status as email_type_id;

SQL SELECT `user_id`,

     client_id,

     status

FROMUSERACTIVITY where status in (2,3,4,8);

LOAD `invitation_id`,

    `user_id`,

     client_id,

     batch_meta_data_id,

    `referrer_email_type_id` as email_type_id ,

    `user_signed` as signed;

SQL SELECT `invitation_id`,

    `user_id`,

    batch_meta_data_id,

    client_id,

    `referrer_email_type_id`,

    `user_signed`

FROM SIGNUPACTIVITY;