This is a course on the Virtual Observatory's main query language ADQL (short for Astronomical Data Query Language), which is a SQL dialect standardised so users do not have to learn new languages each time they want to use a new resource. We also introduce the basic aspects of the Table Access Protocol TAP, which transports ADQL queries, their results as well as the metadata necessary to write meaningful queries. The course comes with many exercises, most of which also have solutions. We hope it is suitable for both self-study and as lecture notes in teacher-led situations.