QL tutorials

Solve puzzles to learn the basics of QL before you analyze code with CodeQL. The tutorials teach you how to write queries and introduce you to key logic concepts along the way.

  • Introduction to QL: Work through some simple exercises and examples to learn about the basics of QL and CodeQL.
  • Find the thief: Take on the role of a detective to find the thief in this fictional village. You will learn how to use logical connectives, quantifiers, and aggregates in QL along the way.
  • Catch the fire starter: Learn about QL predicates and classes to solve your second mystery as a QL detective.
  • Crown the rightful heir: This is a QL detective puzzle that shows you how to use recursion in QL to write more complex queries.
  • Cross the river: Use common QL features to write a query that finds a solution to the “River crossing” logic puzzle.