sqlite> SELECT * from update_test LEFT OUTER JOIN (SELECT COUNT(*) as count1 from update_test GROUP BY name, data1, data2) AS var_count ON update_test.name=var_count.name and update_test.data1=var_count.data1 and update_test.data2=var_count.data2;
Error: no such column: var_count.name