Hello list,

i have a problem finding right query, hope you can help me.
I have a sample table like this:  http://pastebin.com/8qyBzdhH
I want to select all lines where at least 3 lines in column data1 have same value.
My expected result-set ist this: http://pastebin.com/UcaXLVx9
How can this be done in one query?
I tested with something like this:
SELECT *,count(*) as mycount FROM `table` group by data1 having mycount>=3;
But this results in summarized output, but i need every single line.
I would need something like: select * from `table` where count(data1)>3;
But this is not allowed.
Do you have any hints for me?

Thanks,
Hajo

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to