On Wed, Jun 01, 2011 at 12:29:50PM -0700, Synaptic Axon wrote:
On Wed, Jun 1, 2011 at 11:54 AM, Fabian Groffen
wrote: On 01-06-2011 11:48:17 -0700, Synaptic Axon wrote:
What is the correct way to group by the computed field? Should I create a view? Is there a positional syntax for the GROUP BY clause I am overlooking?
Niels knows exactly why this isn't allowed, but why do see this as an issue? I agree it clobbers the query, but that should be all...
Why do I see it as an issue? I was surprised that it was a syntax error and not supported. I would like to be able to execute aggregate queries against parts of a timestamp, to summarize over various periods of time or any number of other computed columns.
I suppose one method would be to store the year as a separate column but that doesn't seem very flexible. I'm not using MonetDB in production but I'm evaluating it for that purpose. I was just surprised that I could not group by the computed year column and think I must be missing something regarding syntax. This isn't a common use case for you? Aliases should work just fine.
Niels
Thank you.
------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl