Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am working with Twitter data. Each tweet has a User ID (who sent it), and a classification: Boo, Cheer, Other.
I want to calculated, as a percentage by user, Boos, Cheers and Others.
I.e. Alex sent 10 tweets, three boos and seven cheers.
Alex's boo percentage is 30%.
This has to be at a user level so I can roll it up - i.e. the average boo % across all the users (calculated at a user level) is 15.3%.
I tried a load where I had
LOAD
Username,
count(Boos)/count(Tweet ID) as % Boos
But that didn't work. Any ideas? Thank you so much.
Did you use the group by statement?
LOAD Username,
Count(Boos)/Count(Tweet ID) as % Boos
Resident source
Group By Username;
Did you use the group by statement?
LOAD Username,
Count(Boos)/Count(Tweet ID) as % Boos
Resident source
Group By Username;
Genius!
Awesome
I am glad it worked.
Best,
Sunny