Advertisement
vojtarek

Untitled

Jun 2nd, 2011
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.43 KB | None | 0 0
  1. SELECT
  2.  --id,
  3.  LANGUAGE,
  4.  source_id,
  5.  date_part('epoch', pubDate) AS DATE,
  6.  LENGTH(text) AS text,
  7.  COALESCE(LENGTH(title), 0) AS title,
  8.  
  9.  least(COALESCE(LENGTH(sentences), 0), 1)=1 AS sentences, -- True for NOT NULL
  10.  
  11.  least(COALESCE(LENGTH(termvector), 0), 1)=1 AS termvector, -- True for NOT NULL
  12.  
  13.  COALESCE(_calaised, FALSE) AS calaised,
  14.  COALESCE(_analyzed, FALSE) AS analyzed
  15.  
  16.  FROM documents
  17.  ORDER BY (pubdate) DESC
  18.  LIMIT 10000;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement