I have a table like this:
a1 b1
a1 b2
a2 b2
a2 b3
And I want to do a 'dummy rows'to have a result like this:
a1 b1 1
a1 b2 1
a1 b3 0
a2 b1 0
a2 b2 1
a2 b3 1
I have done a JOIN but it take too long cuz I have 1.4M rows in my table, anyone has a better idea ?