All pastes #189784 Raw Edit

fangel

public sql v1 · immutable
·published 2006-10-03 13:03 UTC
rendered paste body
SELECT  FROM_UNIXTIME(a.article_publishdate) AS pub_dato,  a.article_title AS overskrift,  a.article_hits AS antal_visninger,  COALESCE((SUM(c.thread_replies) + COUNT(c.thread_id)), 0) AS antal_debatindlaegFROM   comworld_simpson_article aLEFT JOIN   comworld_agora_thread cON  c.articleid = a.article_id AND   a.article_status > 0 AND   a.article_publishdate < UNIX_TIMESTAMP()GROUP BY  c.articleidORDER BY  a.article_publishdate DESCLIMIT  0,1000