Files
2012-02-21 01:15:00 -05:00

1 line
2.1 KiB
JSON

[{"user_id": 7, "stars": [{"date_created": 1297106482.158885, "user_id": 177}], "topic_id": 1834, "date_created": 1297096498.6247549, "message": "D.objects.filter(c__a=a_instance).distinct().count()", "group_id": 81, "id": 47687}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096374.6610141, "message": "I have a four Models, A, B, C, D where B is a Many-to-Many table between A and C, and D is many to one against C", "group_id": 81, "id": 47683}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096393.5006599, "message": "Anyone have any idea on how given an instance of A, I can count the number of unique D's?", "group_id": 81, "id": 47684}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096479.666168, "message": "SQL would be something like select count(distinct *) from A join B on (B.a_id = a.id) join C on (B.c_id = C.id) join D on (D.c_id = C.id) where A.id = ?", "group_id": 81, "id": 47685}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096489.3746541, "message": "though I can't remember if that's the proper count distinct syntax", "group_id": 81, "id": 47686}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096548.8016529, "message": "Oh, backwards", "group_id": 81, "id": 47688}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096553.815228, "message": "lets give that a shot", "group_id": 81, "id": 47689}, {"user_id": 507, "stars": [], "topic_id": 1834, "date_created": 1297096804.7020171, "message": "@alex Nifty voodoo, I had an extra table so it ended up as: TargetHomolog.objects.filter(target__drugtarget__drug=d).distinct().count()", "group_id": 81, "id": 47690}, {"user_id": 218, "stars": [], "topic_id": 1834, "date_created": 1297106359.8446569, "message": "I don't even want to know what a Homolog is.", "group_id": 81, "id": 47868}, {"user_id": 214, "stars": [], "topic_id": 1834, "date_created": 1297106734.810523, "message": "@justinlilly Then whatever you do, don't follow this link: http://en.wiktionary.org/wiki/homolog", "group_id": 81, "id": 47885}]