If I have data in the following format in a database
LE Amount BS Class
1 10 Asset
1 15 Liability
1 20 Asset
1 12 Liability
2 45 Asset
2 74 Asset
2 12 Liability
I want to extract the sum of each LE by BS Class, but I want the BS
class in two seperate columns.
So
LE Assets Liablities
1 30 27
2 119 12
What SQL code can I use to do that.
NB I have run two seperate queries to return Assets & liabilities, but
if one LE has no assets the two tables get out of sequence. I really
need it to say 0 assets vs the liabilities.