Help for this page

Select Code to Download


  1. or download this
    SELECT count(*) as count,category.category,nlevel(category.category) A
    +S level,
    subpath(category.category,0,nlevel(category.category)-1) as parent,
    ...
    WHERE
    data.category <@ category.category
    GROUP BY category.category, category.head_title, category.cat_title, c
    +ategory.subcat_title
    
  2. or download this
             Table "category"
        Column    |       Type         
    ...
    
     subcat_title | character varying  
     category     | ltree
    
  3. or download this
                     Table "data"
           Column       |           Type                                  
    + 
    +----------------------------------------------
     id                 | integer                  
     category           | ltree[]