I have table like..
UID, Read, Unread
Hari, Science, Social
Teja, Statistis, Maths
I need to UID wise count total read and total unread
Ex: UID Count 0f Read, Count of Unread
Hari, 3, 5
Teja, 3, 6
Please suggest me
load UID,sum(if(len(trim(Read))>0,1,0)) as [Count 0f Read] , sum(if(len(trim(Unread))>0,1,0)) as [Count 0f unRead] Group by UID; LOAD * inline [ UID, Read, Unread, Hari, Science, Social Hari, Hindi, Maths Hari, English, Environment Hari, , Geography Hari, , Statistics Teja, Statistis, Maths Teja, Hindi, English Teja, kanada, Geography Teja, , Nuerology Teja , , Physics Teja, , GK ] ;
I guess that is what you are getting with the script i have posted. Can you tell what you are getting with the sample code i have posted and what is wrong ?