This document demonstrates that we can use three conceptual SQL tables for variant annotations, sample phenotypes and genotypes, respectively, to achieve flexible query of genotype data. The tables are conceptual in that they are primarily used for constructing queries but not for storing real data as they are not efficient enough for large-scale data.
We will use an example to show the structure of the three tables and how to query data in standard SQL. You can find all the SQL statements in