tapilab / ctrosset

0 stars 0 forks source link

Filter X matrix by company frequency #8

Closed aronwc closed 10 years ago

aronwc commented 10 years ago

I.e., remove columns that are non-zero for fewer than 3 rows.

cyril94440 commented 10 years ago

I am trying to execute this sql query to filter the datas before building the matrix. It works on mySQL but not on SQLite, or at least in my python script.

DELETE si FROM Users si JOIN (SELECT idFriend FROM Users so GROUP BY idFriend HAVING COUNT( * ) <3) q ON q.idFriend = si.idFriend

Do you have any idea ?

Thank you

cyril94440 commented 10 years ago

I am going to try with a temporary table instead of a JOIN

aronwc commented 10 years ago

This is done, but needs to be checked-in.