I have rows in Tab1:
MyName, MyValue, ...
"AAA", 127, ...
"AAA", 127, ...
"AAA", 133, ...
"AAA", 127, ...
"BBB", 400, ...
"BBB", 400, ...
MyName + MyValue have duplicates :-(
I want to count distinct pairs MyName+MyValue This is my query:
while
select MyName, MyValue
from Tab1
group by MyName, MyValue
where ....
{
counter++;
}
//in this example counter = 3
Is it possible to speedup and simplify query ?
↧
How can I speed up and simplify query ?
↧