Cargo Queries
Technical Pages
- Categorization System
- Category Update (2024)
- Changing Categories, RegEx, and ReplaceText
- Development Backlog
- Development Log
- Development Roadmap
- Iconography
- Integrating SER Standards into Wiki Structures
- New Page Type Templates (2024-25)
- New Page Type Templates (2024-25)/Efforts
- New Page Type Templates (2024-25)/Places
- New Page Type Templates (2024-25)/Topics
- New Page Type Templates (2024-25)/Workgroups
- New Templates - Products
- New Templates - Products/File Pages
- New Templates - Products/Main Pages
- New Templates - Products/No Year
- New User Experience
- Page Editing Forms
- Page Preview Troubleshooting
- Page Templates
- Platform Architecture
- Potential Categories
- Promotional Materials
- Templates, Forms and Tables Using Cargo
- Terminology
See Introduction Pages
See also Page Editing Forms
This page has information about using structure data created thorugh page edit forms to complete queries
- Template talk:Product - samples of cargo queries
- Cargo Extension - Query Guidance
- Special:ViewData
Syntax
{{#cargo_query:
tables=table1=tableAlias1, table2=tablesAlias2, etc.
|join on=table1.fieldA = table2.fieldB,table2.fieldC=table3.fieldD, etc.
|fields=field1=fieldAlias1,field2=Alias2, etc.
|where=table1.fieldE='some value' AND/OR etc.
|group by=table1.fieldG
|having=table1.fieldG='some value', etc.
|order by=table2.fieldF, etc.
|limit=some number
|offset=some number
|intro=some text
|outro=some text
|default=some text
|more results text=some text
|no html
|max display chars=some number
|format=format
...additional format-based parameters
}}
- Product Query
- {{#cargo_query:tables=Products|fields=COUNT(*)|where=Type_Group='Dataset'}} - creates a count of pages fitting a query
Query
All Products where "Authors" = "Cereghino". Note, since we didn't split by Authors, we can't always pull where they are also included, but we might use a match vs. equals to get this.
{{#cargo_query:
tables=Products
|fields=_pageName=Page
|where=Authors='Cereghino'
|format=ul
}}
Dynamic Table
{{#cargo_query:
tables=Products
|fields=_pageName=Page,Type_Group=Type,Authors,Categories
|format=dynamic table
|rows per page=20
|searchable columns=yes
|limit=1000
}}