275 reputation
311
bio website linkedin.com/in/bjansen
location Netherlands
age 28
visits member for 2 years, 7 months
seen yesterday
  • Consultant @ Veneficus
  • Interested in the combination of Finance and Computer Science

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