Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. SELECT node.type, count(node.nid) as count,  node.nid, node.title
  3. FROM node node, content_field_tourist_attraction ta
  4. WHERE ta.field_tourist_attraction_nid = node.nid AND node.type IN ('tourist_attraction')
  5. GROUP BY node.nid ORDER BY count DESC;