I've been learning and practicing sql for about 6 months. I'm ready to throw in and just admit I'm to dumb for it and my brain just can't wrap around most its patterns. I'm trying to create a pivot table. There isn't much in the way simple literature on the subject and the one source I did find talked of creating cubes and basic entity-attribute-value (EAV) logic.. Whatever that means.
name action pagecount
-------------------------------
Company A PRINT 3
Company A PRINT 2
Company A PRINT 3
Company B EMAIL 6
Company B PRINT 2
Company B PRINT 2
Company B PRINT 1
Company A PRINT 3
I want to cross tabulate (is that the right term?) column name
with the total count of column action
and the total count of column pagecount
name action_PRINT action_EMAIL pagecount_PRINT pagecount_EMAIL
--------------------------------------------------------------------------------
Company A 4 0 11 0
Company B 3 1 5 6