# SQL Recipe Book

<figure><img src="https://3441668799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoFNFEIINiGFbhi3Px3dE%2Fuploads%2Fl23pU7iDkaJIbZbpgfQb%2Fimage.png?alt=media&#x26;token=fa0c82dd-dc81-46b9-ac52-0933a81359fe" alt=""><figcaption></figcaption></figure>

Ready-made SQL query templates for common analytical tasks and industry-specific use cases in the **Navixy IoT Query**. Each recipe provides complete, functional SQL code that you can customize and execute directly against your data warehouse instance.

### What you'll find

**Complete SQL templates** with business context, parameter guidance, and optimization tips for the most frequent fleet management and telematics analytical challenges. All queries work with standard **IoT Query** schema structures and are optimized for PostgreSQL environments.

The queries in this book work for both dashboard panels and reports. When adapting a recipe for a report, include all columns needed across the data table, chart, and location map in a single query. See [Creating reports](https://www.navixy.com/docs/analytics/dashboard-studio/creating-reports) for column requirements per component.

{% hint style="warning" %}
Enable **IoT Query** before utilizing data for building comprehensive analytics. If you don't have it yet, contact us for activation details - <iotquery@navixy.com>
{% endhint %}

### Navigation

* [**Common queries**](https://www.navixy.com/docs/analytics/example-queries/common-queries) - Essential SQL templates for everyday fleet management tasks, including device status, user activity, location analysis, and basic reporting functions.
* [**Logistics**](https://www.navixy.com/docs/analytics/example-queries/logistics) - Transportation and supply chain queries covering route optimization, cargo monitoring, fleet utilization, compliance tracking, and delivery performance analytics.
* [**Leasing**](https://www.navixy.com/docs/analytics/example-queries/leasing) - Banking and leasing templates for asset lifecycle management, contract compliance, maintenance scheduling, usage limit enforcement, and risk assessment workflows.

### Request additional recipes

**Need a recipe not in our collection?** Use the feedback feature (click the feedback emoji below) to request new SQL templates. Include your analytical requirement, industry context, and desired output.

**Have a proven template to share?** Click "Edit on GitHub" on any recipe page to contribute directly through our repository.

### Support

For technical assistance with SQL implementation or **IoT Query** connectivity, contact support at <support@navixy.com> with your specific query requirements and system configuration details.
