Reputation
290
Top tag
Next privilege 300 Rep.
Create new tags
Badges
3 12
Newest
 Caucus
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 9 votes cast
Jan
24
revised Efficiently finding distinct values
Improved flow of the question.
Jan
23
comment Efficiently finding distinct values
The statement is pretty long and I'm not familiar with all the idioms (my background is CRUD MySQL apps). I had to look up with m as and the decode function. With some Googling I managed OK. So you're answer is really fine, I just missed some basic knowledge. I do wonder why the database can't optimize the query by itself. I imagine a binary tree starting with month and then year. Checking which (month, year) tuples exist seems so easy.
Jan
23
awarded  Supporter
Jan
23
awarded  Scholar
Jan
23
accepted Efficiently finding distinct values
Jan
23
comment Efficiently finding distinct values
Your solution is a bit over my head but I figured it out. Works like a charm!
Jan
23
awarded  Student
Jan
23
awarded  Editor
Jan
23
comment Efficiently finding distinct values
Thanks, I added some more information to the question.
Jan
23
revised Efficiently finding distinct values
Extended the problem description
Jan
23
asked Efficiently finding distinct values