# Queries

Queries exist in two forms in Secoda:

The first is queries that we extract from an integration. These queries are used to calculate lineage and popularity. See below for more information!

{% content-ref url="queries/extracted-queries" %}
[extracted-queries](https://docs.secoda.co/features/queries/extracted-queries)
{% endcontent-ref %}

The second is queries that can be written and run from within Secoda. Secoda can be a great tool for running analyses and documenting these analyses for future use. Use the link below to learn more.

{% content-ref url="queries/running-queries-in-secoda" %}
[running-queries-in-secoda](https://docs.secoda.co/features/queries/running-queries-in-secoda)
{% endcontent-ref %}
