Hi Noel,

Thanks for the reply. Here's a short bit of SQL that shows the problem. The 
SELECT query at the end fails with:
Column "EX_DATA.ID" must be in the GROUP BY list; SQL statement:
SELECT * FROM ex_data GROUP by date [90016-166] 90016/90016 (Help)

I'm using 1.3.166, but have also tried 1.3.169 to no avail.

Would be great if you could shed some light on what's going on.

Cheers,
ct

DROP TABLE IF EXISTS ex_users;
CREATE TABLE ex_users (id BIGINT(19) NOT NULL,
name CHAR(20) NOT NULL,
PRIMARY KEY(id)
);
INSERT INTO ex_users(id, name) VALUES (1, 'Bill Hicks');
INSERT INTO ex_users(id, name) VALUES (2, 'PJ Harvey');

DROP TABLE IF EXISTS ex_data;
CREATE TABLE ex_data (id BIGINT(19) NOT NULL,
user_id BIGINT(19),
date TIMESTAMP(23, 10) NOT NULL,
t BIGINT(19) NOT NULL, PRIMARY KEY(id),
CONSTRAINT fk_user_id FOREIGN KEY(user_id) REFERENCES ex_users(id)
);
INSERT INTO ex_data(id, user_id, date, t) VALUES (1, 1, '2012-01-01', 10);
INSERT INTO ex_data(id, user_id, date, t) VALUES (2, 1, '2012-01-02', 20);
INSERT INTO ex_data(id, user_id, date, t) VALUES (3, 1, '2012-01-03', 30);
INSERT INTO ex_data(id, user_id, date, t) VALUES (4, 1, '2012-01-04', 40);
INSERT INTO ex_data(id, user_id, date, t) VALUES (5, 2, '2012-01-01', 11);
INSERT INTO ex_data(id, user_id, date, t) VALUES (6, 2, '2012-01-02', 21);
INSERT INTO ex_data(id, user_id, date, t) VALUES (7, 2, '2012-01-03', 31);
INSERT INTO ex_data(id, user_id, date, t) VALUES (8, 2, '2012-01-04', 41);

SELECT * FROM ex_data GROUP by date

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/n2Pho3pM-CMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to