Skip to main content

Timeline for Efficiently finding distinct values

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Jan 23, 2012 at 18:11 comment added Jack Douglas I wonder that too :-)
Jan 23, 2012 at 18:03 comment added Bob Jansen 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, 2012 at 16:15 history edited Jack Douglas CC BY-SA 3.0
added 1221 characters in body
Jan 23, 2012 at 12:40 comment added Jack Douglas Which bits were hard to decipher? I'll try and add some comments so it's more useful to others...
Jan 23, 2012 at 12:28 vote accept Bob Jansen
Jan 23, 2012 at 12:28 comment added Bob Jansen Your solution is a bit over my head but I figured it out. Works like a charm!
Jan 23, 2012 at 10:20 history answered Jack Douglas CC BY-SA 3.0