Exercise 6 of 17
Sequences with a mutation
Fixed training server
For sequences that carry a mutation at nucleotide position 23403, show the strain, country, date and pangoLineage. Order by strain and return the first 20 rows.
The output should have this shape:
strain | country | date | pangoLineage
---------- | ----------- | ---------- | ------------
sample-001 | Switzerland | 2021-01-15 | B.1.1.7
sample-002 | Germany | 2021-01-16 | B.1.1.7Write a query and run it. The result is compared with the reference answer without considering row order.
Loading query editor…
Loading query editor…
Explanation
Filter the table with hasMutation to keep sequences that differ from the nucleotide reference at position 23403. Project the requested columns, order the rows by strain and keep the first 20.
Reference answer
default
.filter(hasMutation(position:=23403, sequenceName:='main'))
.project({strain, country, date, pangoLineage})
.orderBy({strain})
.limit(20)