# Course 2: Learn SQL with TiDB (Code#: 201.2)

## Prerequisites
+ You know how to connect to TiDB with the MySQL Client.

## Description
+ This course teaches you how to write SQL queries. More importantly, it takes performance into consideration at the very first place. Most of the content in the course is also compatible with MySQL. Learners can understand the compatibility of TiDB and MySQL in the course by practice.

## Audience
+ Beginner SQL developers

## Level
+ Introductory

## Duration
+ 1 day

## Summary
+ Querying Data in TiDB
  + Use DESC
  + Retrieve records using a SELECT statement
  + SELECT capabilities: DISTINCT, WHERE, ORDER BY, LIMIT
  + Query data from a MySQL client
  + Get query execution plan
  + Optimize pagination by KeySet seeker
+ Data Types and Expressions
  + Describe data types
  + Describe numeric, date, string, and NULL
  + Describe boolean expression
  + Choose the right data type
+ Functions and Expressions
  + Use String functions
  + Use Date and time functions
  + Use Numeric functions
  + Use aggregate functions
  + Run a simple analysis using RANK window function
  + Use control flow functions
  + Understand TiKV expression push down
+ Joins
  + JOIN concepts
  + JOIN multiple tables
  + UNION and other set operations on multiple queries
+ Subqueries
  + Subquery concept
  + Simple subqueries
  + Correlated subqueries



