Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In the Advanced Query section of the BioQ::Query page you may enter a precise SQL query that will be passed to our MySQL database server. A tutorial on writing SQL queries can be found here, and general documentation on MySQL can be found here.

e

You can specify any table from the current database, which in thise case is 1000 Genomes IP1 Release. You can also access other databases using database.table notation, such as bioq_dbsnp_human_134.snp_summary.

...

Code Block
themeEclipse
languagesql
linenumberstrue
SELECT LSS.rep_gene_symbol AS "Gene Symbol",
       COUNT(*) AS "Number of SNPs"
FROM my_snps MS
INNER JOIN _loc_snp_summary AS LSS ON (MS.snp_id = LSS.snp_id)
GROUP BY LSS.rep_gene_symbol
ORDER BY COUNT(*) DESC

Execute Query

Note that in this example we have used the AS keyword after column specifications in the SELECT statement. This has the effect of naming the columns in the results of the query. This is useful when functions and other complex expressions are used in the query.

...