Hi There,
I have some problem with the row_number() over() function.
Consider the following table:
create table "table1" ("customer" varchar(40), "product" varchar(40),
"price" double)
insert into "table1" values ('cust1', 'p1', 100)
insert into "table1" values ('cust1', 'p2', 200)
insert into "table1" values ('cust1', 'p3', 150)
insert into "table1" values ('cust2', 'p1', 300)
insert into "table1" values ('cust2', 'p3', 200)
The following query over this table:
SELECT "customer",
"product",
"sumprice",
(Row_number() OVER(PARTITION BY "customer" ORDER BY "sumprice")) as
"rank"
FROM ( SELECT "customer",
"product",
(Sum("price")) AS "sumprice"
FROM "table1"
GROUP BY "customer",
"product") AS "temp"
Returns:
Customer product sumprice rank
Cust1 p1 100 1
Cust1 p2 200 2
Cust1 p3 150 3
Cust2 p1 300 1
Cust2 p3 200 2
But doesn’t it suppose to return the following result set?:
Customer product sumprice rank
Cust1 p1 100 1
Cust1 p3 150 2
Cust1 p2 200 3
Cust2 p3 200 1
Cust2 p1 200 2
Thanks
--
Leonard Forgge
--
View this message in context: http://www.nabble.com/Possible-wrong-results-when-Querying-tp22821802p22821…
Sent from the monetdb-users mailing list archive at Nabble.com.
Dear Christoph,
I'm currently traveling, hence only a quick reply.
Most probably, the reason that your haven't receive any answer to your
question, yet, is that noone seems to have an answer, yet.
Looking at your report, again, I do have a couple of questions and
suggestions (inlined below) that might help you and us to locate the origin
of your problem.
On Mon, Jun 29, 2009 at 05:37:56PM +0200, Christoph Beekmans wrote:
> Dear Mr. Manegold,
>
> i have a problem with MonetDB and i sent my problem to the user-mailing
> list.
> Unfortunately nobody answered on my topic and this is a few weeks ago and
> i wasn't the first to mail the problem.
>
> So i decided to contact someone of the cwi-team directly and i hope you
> are able
> to help me in some way.
>
> Here the message i sent to the mailing list:
>
>> Hi everybody,
>>
>> I posted my issue a few weeks ago, but i got no answer, so
>> i try i again.
>>
>> I installed MonetDB on Windows with the geom module and
Which version of MonetDB are you using/talking about?
>> afterwards i tried to execute a query with some geometric data types.
>> But after a few changes to the query and execution i got an error.
What data did you load?
What kind of queries did you run?
Which error did you get?
>> After that i had to restart MonetDB but i got an error message that
>> the system tables couldn`t be loaded.
Could you quote the exact error message?
>> If i start the server without geom support it starts fine but the sql
>> client
>> can`t connect:
>>
>> "Connection terminated
>> Press any key to continue . . . "
Does the server continue running, or does it crash in that case?
If the latter, is there any error message on the server console/window?
If so, which?
>> If i start the server with geom support it loads the sql and geom modules
>> but shuts down after that without error message.
Could you try running the server on a new empty database?
Does that work?
If so, could you then replay the steps you did before to see, whether you
can reproduce the crash and (potential) corruption of the database?
>> Even a reinstall didn't fix it so the error must be somewhere else.
did you remove your database before/after the reistall, or are you (still)
using the same (possibly corrupoted) database?
>> Has anyone an idea about that?
>>
>> Please help,
>> Thanks.
>
> I would be grateful for an answer,
> Christoph
Hope this helps for now ...
Stefan
--
| Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
Hi,
How can I know if a string field in a table has a hash table or not?
I am asking this because I noticed that string fields with millions of
unique values run very slowly, and from your documentation I understood that
if I add too many unique strings to a column, then internally Monet will
stop using a hash-table, and performance will be affected.
Thanks.
--
View this message in context: http://www.nabble.com/String-performance-tp24256780p24256780.html
Sent from the monetdb-users mailing list archive at Nabble.com.
Hello,
I've downloaded MonetDB5-SQL-Installer-i386-20090530.msi <http://monetdb.cwi.nl/downloads/Windows/May2009/MonetDB5-SQL-Installer-i386…> for windows.
However there was no JDBC-driver in the package.
After some searching on Google I found one called "jdbcclient.jar".
But I still cannot connect to the database as I get a error message saying
that the "demo"-database does not exist.
What am I missing?
Thanks in advance.
---------------------------------------
Sten Hjelmqvist
DataKonsult
MERdata AB
Sveavägen 33, 111 34 Stockholm
Mobil : 0708 305616
E-mejl : sten.hjelmqvist(a)merdata.se <mailto:sten.hjelmqist@merdata.se>
Webb : www.merdata.se <http://www.main.se/>
---------------------------------------
Hi,
I've loaded 60 GB of data file into a table. On Windows (NTFS) the size
of dbfarm changed to 80GB but on Linux (ext4 or reiserfs) dbfarm
changed to 180GB. Why is that? Thanks. Dariusz.
Hi everybody,
I posted my issue a few weeks ago, but i got no answer, so
i try i again.
I installed MonetDB on Windows with the geom module and
afterwards i tried to execute a query with some geometric data types.
But after a few changes to the query and execution i got an error.
After that i had to restart MonetDB but i got an error message that
the system tables couldn`t be loaded.
If i start the server without geom support it starts fine but the sql
client
can`t connect:
"Connection terminated
Press any key to continue . . . "
If i start the server with geom support it loads the sql and geom modules
but shuts down after that without error message.
Even a reinstall didn't fix it so the error must be somewhere else.
Has anyone an idea about that?
Please help,
Thanks.
Dear users,
In our ongoing effort to improve the MonetDB software suite
we would like to hear from you. It appears that MonetDB is
used for teaching, and customers use it for/within their products.
Also, the divergence in primary platform is crucial for us
to keep focus.
We would greately appreciate if you could replay with a short
message how you deploy the software and your top priorities for
a next release.
Thank you for you cooperation,
Martin Kersten
Hi,
I installed the new May2009 release.
On Windows32 I have no problem connecting through Mapi.
On Windows64, however, I can't connect. I get a 'Setup connection failed'
error from Mapi.
(I had no problem connecting on Windows64 with the Feb09 release)
Please help,
Thanks.
--
View this message in context: http://www.nabble.com/May2009---can%27t-connect-on-Windows64-tp24056525p240…
Sent from the monetdb-users mailing list archive at Nabble.com.