# Your new favorite query language

https://www.sanity.io/learn/course/between-groq-and-a-hard-place/your-new-favourite-query-language

Why you'll learn (and love) GROQ in this course, and why not GraphQL?

---

## Navigation

**Track:** [Mastering content operations](https://www.sanity.io/learn/track/sanity-developer-essentials) · [View as markdown](https://www.sanity.io/learn/track/sanity-developer-essentials.md)

**Course:** [Between GROQ and a hard place](https://www.sanity.io/learn/course/between-groq-and-a-hard-place) · [View as markdown](https://www.sanity.io/learn/course/between-groq-and-a-hard-place.md)

**Next:** [The Vision Tool](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/the-vision-tool)

---

## Course Contents

1. **Your new favorite query language** *(current)*
2. [The Vision Tool](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/the-vision-tool)
3. [Filters and projections](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/filters-and-projections)
4. [Functions, in my queries?](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/functions-in-my-queries)
5. [Custom functions](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/custom-functions)
6. [Joins and subqueries](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/joins-and-subqueries)
7. [Chained projections](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/chained-projections)
8. [Query parameters](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/conditional-parameters)
9. [Handling missing values](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/null-handling-and-prevention)

---

> [Video: Your new favorite query language](https://www.sanity.io/learn/course/between-groq-and-a-hard-place/your-new-favourite-query-language)

Sanity provides two methods to query data: **GROQ** and **GraphQL**. 



> [!TIP]
> Compare [GROQ and GraphQL](https://www.sanity.io/learn/content-lake/what-about-graphql) in the documentation



You'll learn GROQ in this track as it is the preferred method for querying content from Sanity and powers other features like user role permissions and filters in functions.



> [!TIP]
> See [Roles](https://www.sanity.io/learn/user-guides/roles) for how GROQ is used to configure "Content resources"


> [!TIP]
> See [Create a Document Function](https://www.sanity.io/learn/functions/function-quickstart) for how function invocations can be limited by a GROQ filter



## Prerequisites and assumptions



- You have a Sanity Studio with `event`, `artist` and `venue` type documents, just like you created in the [Day one content operations](https://www.sanity.io/learn/course/day-one-with-sanity-studio) course.

- You won’t need to know any GROQ in advance to complete these exercises.


## More resources



Here are some great resources already to learn and experiment more with GROQ:



> [!TIP]
> Visual playground [groq.dev](https://groq.dev/)


> [!TIP]
> Free “Introduction to GROQ Query Language” course on [Egghead.io](https://egghead.io/courses/introduction-to-groq-query-language-6e9c6fc0)



---

## Related Resources

- [Full course as markdown](https://www.sanity.io/learn/course/between-groq-and-a-hard-place.md)
- [Track overview](https://www.sanity.io/learn/track/sanity-developer-essentials.md)
- [All courses and lessons](https://www.sanity.io/learn/sitemap.md)
- [Complete content for LLMs](https://www.sanity.io/learn/llms-full.txt)

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://www.sanity.io/learn/resource/feedback

```json
{
  "path": "/learn/course/between-groq-and-a-hard-place/your-new-favourite-query-language.md",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>
