Given the following table (how to format them correctly here?)
primary secondary
A a
A b
A b
B a
B a
B b
I am trying to get comparative group calculations using self-join.
Getting the following set of results is easy:
Primary Secondary Count
A a 1
A b 2
B a 2
B b 1
with something like:
select primary, secondary, counter (*) from the foobar group primary, secondary
But I really want this:
Primary Secondary Count Primary Secondary Count
A a 1 B a 2
A b 2 B b 1
When numbers and group bytes are not involved, self-joins are simple. But it seems like I can't do it.
Does this make “independent AFTER joining” impossible? If I need to play temp table games, I will do it (although I wouldn’t), since the real goal is one sql block (something I can script), more than one select statement.
.
?
... , ;)
" ", , - " " "" " " "" ", B: B, , , , .