> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: wix-data ## Namespace: wix-data-query ## Article: Introduction ## Article Link: https://dev.wix.com/docs/velo/apis/wix-data/wix-data-query/introduction.md ## Article Content: # Introduction The `WixDataQuery` functions enable you to run, sort, filter, and control which results a query returns. Typically, you build a query using the [`query()`](wix-data.html#query) function, refine the query by chaining `WixDataQuery` functions, and then execute the query by chaining *one* of the following: [`find()`](#find), [`distinct()`](#distinct), or [`count()`](#count) For example, the following code queries a collection for all male customers over the age of 20 and logs the first 15 results to the console, sorted in ascending order by name: ```javascript import wixData from 'wix-data'; wixData.query("Customer") .gt("age", 20) .ascending("name") .limit(15) .find() .then((results) => { console.log(results.items); }); ``` When working with [Wix app collections](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code), fields in the collections have the following permissions: + Can connect to data + Can use in dynamic page URL + Can be sorted + Can be filtered + Read-only Check [which fields](https://support.wix.com/en/search?term=velo%20collection%20fields) can be used in a query.