Advertisement
vojtarek

Untitled

Jun 2nd, 2011
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.65 KB | None | 0 0
  1. SELECT 'stanford true', COUNT(*)
  2. FROM documents
  3. WHERE source_id IN (SELECT id FROM prefered_sources)
  4. AND _stanford IS TRUE
  5.  
  6. UNION
  7.  
  8. SELECT 'analyzed true', COUNT(*)
  9. FROM documents
  10. WHERE source_id IN (SELECT id FROM prefered_sources)
  11. AND _analyzed IS TRUE
  12.  
  13. UNION
  14. SELECT 'sentences not null', COUNT(*)
  15. FROM documents
  16. WHERE source_id IN (SELECT id FROM prefered_sources)
  17. AND sentences IS NOT NULL
  18.  
  19. UNION
  20. SELECT 'termvetor not null', COUNT(*)
  21. FROM documents
  22. WHERE source_id IN (SELECT id FROM prefered_sources)
  23. AND termvector IS NOT NULL
  24.  
  25. UNION
  26. SELECT 'calaised true', COUNT(*)
  27. FROM documents
  28. WHERE source_id IN (SELECT id FROM prefered_sources)
  29. AND _calaised IS TRUE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement