Help for this page

Select Code to Download


  1. or download this
    CREATE VIEW vote_histogram AS
      SELECT t1.uid AS uid, t2.uid AS voted_for, sum(t1.voted) AS count
    ...
        WHERE t1.thread_id = t2.thread_id AND t1.uid != t2.uid
        GROUP BY t1.uid, t2.uid
        ORDER BY t1.uid;